@Test public void testColumnExcess() { DataSetLookup lookup = DataSetLookupFactory.newDataSetLookupBuilder() .group(DATE).fixed(DateIntervalType.MONTH, true) .column(DATE) .column(AMOUNT, AggregateFunctionType.SUM) .column(AMOUNT, AggregateFunctionType.AVERAGE) .buildLookup(); ValidationError error = TWO_COLUMNS_GROUPED.check(lookup, METADATA); assertNotNull(error); assertEquals(error.getCode(), DataSetLookupConstraints.ERROR_COLUMN_NUMBER); }
public ValidationError check(DataSetLookup lookup) { return check(lookup, null); }
DataSetLookupConstraints extends DataSetConstraints<DataSetLookupConstraints> { public ValidationError check(DataSetLookup lookup) { return check(lookup, null); } }
DataSetLookupConstraints extends DataSetConstraints<DataSetLookupConstraints> { public ValidationError check(DataSetLookup lookup) { return check(lookup, null); }  }
DataSetLookupConstraints extends DataSetConstraints<DataSetLookupConstraints> { public ValidationError check(DataSetLookup lookup) { return check(lookup, null); }  boolean isUniqueColumnIds(); DataSetLookupConstraints setUniqueColumnIds(boolean uniqueColumnIds); boolean isFilterAllowed(); DataSetLookupConstraints setFilterAllowed(boolean filterAllowed); boolean isGroupAllowed(); DataSetLookupConstraints setGroupAllowed(boolean groupAllowed); boolean isGroupRequired(); DataSetLookupConstraints setGroupRequired(boolean groupRequired); int getMaxGroups(); DataSetLookupConstraints setMaxGroups(int maxGroups); String getGroupsTitle(); DataSetLookupConstraints setGroupsTitle(String groupsTitle); String getColumnsTitle(); DataSetLookupConstraints setColumnsTitle(String columnsTitle); DataSetLookupConstraints setColumnTitle(Integer index, String title); String getColumnTitle(Integer index); boolean isGroupColumn(); DataSetLookupConstraints setGroupColumn(boolean groupColumn); boolean isFunctionRequired(); DataSetLookupConstraints setFunctionRequired(boolean functionRequired); ValidationError check(DataSetLookup lookup); ValidationError check(DataSetLookup lookup, DataSetMetadata metadata); DataSetLookup newDataSetLookup(DataSetMetadata metatada); String buildUniqueColumnId(DataSetLookup lookup, String targetId); String buildUniqueColumnId(DataSetLookup lookup, GroupFunction column); }
DataSetLookupConstraints extends DataSetConstraints<DataSetLookupConstraints> { public ValidationError check(DataSetLookup lookup) { return check(lookup, null); }  boolean isUniqueColumnIds(); DataSetLookupConstraints setUniqueColumnIds(boolean uniqueColumnIds); boolean isFilterAllowed(); DataSetLookupConstraints setFilterAllowed(boolean filterAllowed); boolean isGroupAllowed(); DataSetLookupConstraints setGroupAllowed(boolean groupAllowed); boolean isGroupRequired(); DataSetLookupConstraints setGroupRequired(boolean groupRequired); int getMaxGroups(); DataSetLookupConstraints setMaxGroups(int maxGroups); String getGroupsTitle(); DataSetLookupConstraints setGroupsTitle(String groupsTitle); String getColumnsTitle(); DataSetLookupConstraints setColumnsTitle(String columnsTitle); DataSetLookupConstraints setColumnTitle(Integer index, String title); String getColumnTitle(Integer index); boolean isGroupColumn(); DataSetLookupConstraints setGroupColumn(boolean groupColumn); boolean isFunctionRequired(); DataSetLookupConstraints setFunctionRequired(boolean functionRequired); ValidationError check(DataSetLookup lookup); ValidationError check(DataSetLookup lookup, DataSetMetadata metadata); DataSetLookup newDataSetLookup(DataSetMetadata metatada); String buildUniqueColumnId(DataSetLookup lookup, String targetId); String buildUniqueColumnId(DataSetLookup lookup, GroupFunction column); static final int ERROR_GROUP_NUMBER; static final int ERROR_GROUP_NOT_ALLOWED; static final int ERROR_GROUP_REQUIRED; static final int ERROR_DUPLICATED_COLUMN_ID; }