return;
if(curDimension >= getDimensions().size())
return;
dimensionIndexes.add(curDimension);
if(dimensionIndexes.size() == numberOfDimensions) {
AggregationCubeDescriptor aggCubeDescriptor = new AggregationCubeDescriptor();
StringBuilder aggCubeName = new StringBuilder(getCubeName());
aggCubeName.append("_aggregate");
for(CubeMeasure measure: getMeasures()) {
aggCubeDescriptor.getAggregates().add(new SumCubeScanAggregate("sum(" + measure.getName() +
")", this));
aggCubeDescriptor.getAggregates().add(new MinCubeScanAggregate("min(" + measure.getName() +
")", this));
aggCubeDescriptor.getAggregates().add(new MaxCubeScanAggregate("max(" + measure.getName() +
")", this));
aggCubeDescriptor.getAggregates().add(new CountCubeScanAggregate("count(" + measure.getName() +
")", this));
}
for(CubeScanAggregate aggregate: aggCubeDescriptor.getAggregates())
aggCubeDescriptor.getMeasures().add(new CubeMeasure(aggregate.getColumnName() +
"_" + aggregate.getAggregateName()));
for(int i: dimensionIndexes)
aggCubeDescriptor.getDimensions().add(new CubeDimension(getDimensions().get(i).getName()));
for(CubeDimension dimension: aggCubeDescriptor.getDimensions())
aggCubeName.append("_" + dimension.getName());
aggCubeDescriptor.setCubeName(aggCubeName.toString());
getAggregationCubes().add(aggCubeDescriptor);
dimensionIndexes.remove(dimensionIndexes.size() - 1);
return;
}
for(int nextDimension = curDimension + 1; nextDimension < getDimensions().size(); nextDimension ++)