[New] Allow to reference object in report

This commit is contained in:
Robert von Burg 2018-07-13 12:19:23 +02:00
parent 42dc80592d
commit 060e3f21ad
3 changed files with 8 additions and 5 deletions

View File

@ -19,6 +19,7 @@ public class ReportConstants {
public static final String PARAM_POLICY = "policy";
public static final String PARAM_ALLOW_MISSING_COLUMNS = "allowMissingColumns";
public static final String COL_OBJECT = "$object";
public static final String COL_ID = "$id";
public static final String COL_NAME = "$name";
public static final String COL_TYPE = "$type";

View File

@ -332,9 +332,11 @@ public class GenericReport extends ReportPolicy {
Object columnValue;
if (column == null)
if (column == null) {
columnValue = EMPTY;
else if (columnDef.equals(COL_ID)) {
} else if (columnDef.equals(COL_OBJECT)) {
columnValue = column;
} else if (columnDef.equals(COL_ID)) {
columnValue = column.getId();
} else if (columnDef.equals(COL_NAME)) {
columnValue = column.getName();

View File

@ -19,9 +19,9 @@ public abstract class ReportFilterPolicy extends StrolchPolicy {
super(container, tx);
}
private boolean negate;
private String filterValue;
private Object left;
protected boolean negate;
protected String filterValue;
protected Object left;
public boolean isNegate() {
return this.negate;