Search in sources :

Example 1 with PivotTableDataBuilder

use of org.activityinfo.shared.command.handler.pivot.PivotTableDataBuilder in project activityinfo by bedatadriven.

the class PivotGenerator method generateData.

protected PivotTableData generateData(int userId, Locale locale, T element, Filter filter, List<Dimension> rowDims, List<Dimension> colDims) {
    PivotResult result = getDispatcher().execute(new PivotSites(element.allDimensions(), filter));
    PivotTableDataBuilder builder = new PivotTableDataBuilder();
    return builder.build(element, rowDims, colDims, result.getBuckets());
}
Also used : PivotSites(org.activityinfo.shared.command.PivotSites) PivotResult(org.activityinfo.shared.command.PivotSites.PivotResult) PivotTableDataBuilder(org.activityinfo.shared.command.handler.pivot.PivotTableDataBuilder)

Example 2 with PivotTableDataBuilder

use of org.activityinfo.shared.command.handler.pivot.PivotTableDataBuilder in project activityinfo by bedatadriven.

the class GeneratePivotTableHandler method buildResult.

protected PivotContent buildResult(PivotTableReportElement model, PivotResult result) {
    PivotTableDataBuilder builder = new PivotTableDataBuilder();
    PivotTableData data = builder.build(model, model.getRowDimensions(), model.getColumnDimensions(), result.getBuckets());
    PivotContent content = new PivotContent();
    content.setEffectiveFilter(model.getFilter());
    content.setData(data);
    return content;
}
Also used : PivotTableData(org.activityinfo.shared.report.content.PivotTableData) PivotContent(org.activityinfo.shared.report.content.PivotContent) PivotTableDataBuilder(org.activityinfo.shared.command.handler.pivot.PivotTableDataBuilder)

Aggregations

PivotTableDataBuilder (org.activityinfo.shared.command.handler.pivot.PivotTableDataBuilder)2 PivotSites (org.activityinfo.shared.command.PivotSites)1 PivotResult (org.activityinfo.shared.command.PivotSites.PivotResult)1 PivotContent (org.activityinfo.shared.report.content.PivotContent)1 PivotTableData (org.activityinfo.shared.report.content.PivotTableData)1