Examples of TotalsListsBuilder


Examples of org.saiku.service.olap.totals.TotalsListsBuilder

        //@formatter:off
        final AxisInfo[] axisInfos = new AxisInfo[] { new AxisInfo(cellSet.getAxes().get(rowsIndex)),
          new AxisInfo(cellSet.getAxes().get(rowsIndex + 1 & 1)) };
        //@formatter:on
        List<TotalNode>[][] totals = new List[2][];
        TotalsListsBuilder builder = null;
        for (int index = 0; index < 2; index++) {
          final int second = index + 1 & 1;
          TotalAggregator[] aggregators = new TotalAggregator[axisInfos[second].maxDepth + 1];
          for (int i = 1; i < aggregators.length - 1; i++) {
            String totalFunctionName = query.getTotalFunction(axisInfos[second].uniqueLevelNames.get(i - 1));
            aggregators[i] = TotalAggregator.newInstanceByFunctionName(totalFunctionName);
          }
          String totalFunctionName = query.getTotalFunction(axisInfos[second].axis.getAxisOrdinal().name());
          aggregators[0] =
              totalFunctionName != null ? TotalAggregator.newInstanceByFunctionName(totalFunctionName) : null;
          builder = new TotalsListsBuilder(selectedMeasures, aggregators, cellSet, axisInfos[index], axisInfos[second]);
          totals[index] = builder.buildTotalsLists();
        }
        result.setLeftOffset(axisInfos[0].maxDepth);
        result.setRowTotalsLists(totals[1]);
        result.setColTotalsLists(totals[0]);
      }
View Full Code Here

Examples of org.saiku.service.olap.totals.TotalsListsBuilder

      //@formatter:off
      final AxisInfo[] axisInfos = new AxisInfo[] { new AxisInfo(cellSet.getAxes().get(rowsIndex)),
        new AxisInfo(cellSet.getAxes().get(rowsIndex + 1 & 1)) };
      //@formatter:on
      List<TotalNode>[][] totals = new List[2][];
      TotalsListsBuilder builder = null;
      for (int index = 0; index < 2; index++) {
        final int second = index + 1 & 1;
        TotalAggregator[] aggregators = new TotalAggregator[axisInfos[second].maxDepth + 1];
        for (int i = 1; i < aggregators.length - 1; i++) {
          List<String> aggs = query.getAggregators(axisInfos[second].uniqueLevelNames.get(i - 1));
          String totalFunctionName = aggs != null && aggs.size() > 0 ? aggs.get(0) : null;
          aggregators[i] =
              StringUtils.isNotBlank(totalFunctionName)
              ? TotalAggregator.newInstanceByFunctionName(totalFunctionName)
              : null;
        }
        List<String> aggs = query.getAggregators(axisInfos[second].axis.getAxisOrdinal().name());
        String totalFunctionName = aggs != null && aggs.size() > 0 ? aggs.get(0) : null;
        aggregators[0] =
            StringUtils.isNotBlank(totalFunctionName) ? TotalAggregator.newInstanceByFunctionName(totalFunctionName)
                                                      : null;
        builder = new TotalsListsBuilder(selectedMeasures, aggregators, cellSet, axisInfos[index], axisInfos[second]);
        totals[index] = builder.buildTotalsLists();
      }
      result.setLeftOffset(axisInfos[0].maxDepth);
      result.setRowTotalsLists(totals[1]);
      result.setColTotalsLists(totals[0]);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.