public DataSetGroup cloneInstance() { DataSetGroup clone = new DataSetGroup(); clone.dataSetUUID = dataSetUUID; if (columnGroup != null) clone.columnGroup = columnGroup.cloneInstance(); clone.join = join; clone.selectedIntervalList = new ArrayList(); for (Interval interval : selectedIntervalList) { clone.selectedIntervalList.add(interval.cloneInstance()); } clone.groupFunctionList = new ArrayList(); for (GroupFunction groupFunction : groupFunctionList) { clone.groupFunctionList.add(groupFunction.cloneInstance()); } return clone; }
public DataSetGroup cloneInstance() { DataSetGroup clone = new DataSetGroup(); clone.dataSetUUID = dataSetUUID; if (columnGroup != null) clone.columnGroup = columnGroup.cloneInstance(); clone.join = join; clone.selectedIntervalList = new ArrayList(); for (Interval interval : selectedIntervalList) { clone.selectedIntervalList.add(interval.cloneInstance()); } clone.groupFunctionList = new ArrayList(); for (GroupFunction groupFunction : groupFunctionList) { clone.groupFunctionList.add(groupFunction.cloneInstance()); } return clone; }
void onAddColumn() { if (lookupConstraints.areExtraColumnsAllowed()) { DataSetGroup op = getFirstGroupOp(); List<GroupFunction> functionList = op.getGroupFunctions(); GroupFunction last = functionList.get(functionList.size() - 1); GroupFunction clone = last.cloneInstance(); String newColumnId = lookupConstraints.buildUniqueColumnId(dataSetLookup, clone); clone.setColumnId(newColumnId); functionList.add(clone); updateColumnControls(); changeEvent.fire(new DataSetLookupChangedEvent(dataSetLookup)); } }
void onAddColumn() { if (lookupConstraints.areExtraColumnsAllowed()) { DataSetGroup op = getFirstGroupOp(); List<GroupFunction> functionList = op.getGroupFunctions(); GroupFunction last = functionList.get(functionList.size() - 1); GroupFunction clone = last.cloneInstance(); String newColumnId = lookupConstraints.buildUniqueColumnId(dataSetLookup, clone); clone.setColumnId(newColumnId); functionList.add(clone); updateColumnControls(); changeEvent.fire(new DataSetLookupChangedEvent(dataSetLookup)); } }
@Override protected void beforeDataSetLookup() { DataSetGroup group = dataSetHandler.getCurrentDataSetLookup().getLastGroupOp(); if (group != null && (group.getAggregationFunctions().isEmpty() || group.getColumnGroup() != null || group.getGroupFunctions().size() < 2)) { group.setColumnGroup(null); GroupFunction minFunction = group.getGroupFunctions().get(0); minFunction.setFunction(AggregateFunctionType.MIN); GroupFunction maxFunction = minFunction.cloneInstance(); maxFunction.setFunction(AggregateFunctionType.MAX); group.addGroupFunction(maxFunction); } }
@Override protected void beforeDataSetLookup() { DataSetGroup group = dataSetHandler.getCurrentDataSetLookup().getLastGroupOp(); if (group != null && (group.getAggregationFunctions().isEmpty() || group.getColumnGroup() != null || group.getGroupFunctions().size() < 2)) { group.setColumnGroup(null); GroupFunction minFunction = group.getGroupFunctions().get(0); minFunction.setFunction(AggregateFunctionType.MIN); GroupFunction maxFunction = minFunction.cloneInstance(); maxFunction.setFunction(AggregateFunctionType.MAX); group.addGroupFunction(maxFunction); } }
public DataColumn cloneEmpty() { DataColumnImpl otherCol = new DataColumnImpl(); otherCol.setId(getId()); otherCol.setColumnType(getColumnType()); if (columnGroup != null) otherCol.setColumnGroup(columnGroup.cloneInstance()); otherCol.setIntervalType(getIntervalType()); otherCol.setMinValue(getMinValue()); otherCol.setMaxValue(getMaxValue()); if (groupFunction != null) otherCol.setGroupFunction(groupFunction.cloneInstance()); return otherCol; }
public DataColumn cloneEmpty() { DataColumnImpl otherCol = new DataColumnImpl(); otherCol.setId(getId()); otherCol.setColumnType(getColumnType()); if (columnGroup != null) otherCol.setColumnGroup(columnGroup.cloneInstance()); otherCol.setIntervalType(getIntervalType()); otherCol.setMinValue(getMinValue()); otherCol.setMaxValue(getMaxValue()); if (groupFunction != null) otherCol.setGroupFunction(groupFunction.cloneInstance()); return otherCol; }
GroupFunction extra = gf2.cloneInstance(); String extraId = lookupConstraints.buildUniqueColumnId(lookup, extra); extra.setColumnId(extraId); assertNotNull(extraId); extra = gf2.cloneInstance(); extraId = lookupConstraints.buildUniqueColumnId(lookup, extra); extra.setColumnId(extraId);
GroupFunction extra = gf2.cloneInstance(); String extraId = lookupConstraints.buildUniqueColumnId(lookup, extra); extra.setColumnId(extraId); assertNotNull(extraId); extra = gf2.cloneInstance(); extraId = lookupConstraints.buildUniqueColumnId(lookup, extra); extra.setColumnId(extraId);