Class CrosstabBucketingService
- java.lang.Object
-
- net.sf.jasperreports.crosstabs.fill.calculation.BucketingService
-
- net.sf.jasperreports.crosstabs.fill.calculation.CrosstabBucketingService
-
- All Implemented Interfaces:
BucketingData
public class CrosstabBucketingService extends BucketingService implements BucketingData
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
CrosstabBucketingService.CollectedList
protected static class
CrosstabBucketingService.CollectedListComparator
protected static class
CrosstabBucketingService.OrderedCollectedList
protected static class
CrosstabBucketingService.SequentialCollectedList
-
Nested classes/interfaces inherited from class net.sf.jasperreports.crosstabs.fill.calculation.BucketingService
BucketingService.BucketListMap, BucketingService.BucketMap, BucketingService.BucketMapMap, BucketingService.MapEntry
-
-
Field Summary
Fields Modifier and Type Field Description protected CrosstabCell[][]
cells
protected HeaderCell[][]
colHeaders
static String
EXCEPTION_MESSAGE_KEY_DATA_NOT_PROCESSED
protected HeaderCell[][]
rowHeaders
-
Fields inherited from class net.sf.jasperreports.crosstabs.fill.calculation.BucketingService
allBuckets, bucketMeasureLimit, buckets, bucketValueMap, colBucketCount, columnBucketMap, dataCount, DIMENSION_COLUMN, DIMENSION_ROW, DIMENSIONS, EXCEPTION_MESSAGE_KEY_BUCKET_DATA_PROCESSED, EXCEPTION_MESSAGE_KEY_BUCKET_MEASURE_LIMIT, measureIndexes, measures, origMeasureCount, processed, PROPERTY_BUCKET_MEASURE_LIMIT, retrieveTotal, rowBucketCount, rowRetrColMax, rowRetrTotalMax, rowRetrTotalMin, rowRetrTotals, serviceContext, sorted, zeroMeasureValues, zeroUserMeasureValues
-
-
Constructor Summary
Constructors Constructor Description CrosstabBucketingService(BucketingServiceContext serviceContext, List<BucketDefinition> rowBuckets, List<BucketDefinition> columnBuckets, List<MeasureDefinition> measures, boolean sorted, boolean[][] retrieveTotal)
-
Method Summary
-
Methods inherited from class net.sf.jasperreports.crosstabs.fill.calculation.BucketingService
addData, addMeasure, bucketMeasuresCreated, checkBucketMeasureCount, checkTotals, clear, computeColumnTotal, computeRowTotals, computeTotals, createBucketMap, createBucketMapMap, createRowTotalsBucketMap, getBucketValues, getGrandTotals, getMeasureValues, getRowBuckets, getUserMeasureValues, getZeroUserMeasureValues, hasData, initMeasureValues, initUserMeasureValues, processData, sumVals
-
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_DATA_NOT_PROCESSED
public static final String EXCEPTION_MESSAGE_KEY_DATA_NOT_PROCESSED
- See Also:
- Constant Field Values
-
colHeaders
protected HeaderCell[][] colHeaders
-
rowHeaders
protected HeaderCell[][] rowHeaders
-
cells
protected CrosstabCell[][] cells
-
-
Constructor Detail
-
CrosstabBucketingService
public CrosstabBucketingService(BucketingServiceContext serviceContext, List<BucketDefinition> rowBuckets, List<BucketDefinition> columnBuckets, List<MeasureDefinition> measures, boolean sorted, boolean[][] retrieveTotal)
-
-
Method Detail
-
createCrosstab
public void createCrosstab() throws JRException
- Throws:
JRException
-
createHeaders
protected HeaderCell[][] createHeaders(byte dimension, CrosstabBucketingService.CollectedList[] headersLists, BucketingService.BucketMap totalsMap)
-
createHeadersList
protected CrosstabBucketingService.CollectedList createHeadersList(byte dimension, BucketingService.BucketMap bucketMap, int level, boolean total) throws JRException
- Throws:
JRException
-
getMeasureTotals
public MeasureDefinition.MeasureValue[] getMeasureTotals(BucketingService.BucketMap bucketMap, BucketDefinition.Bucket bucket)
- Specified by:
getMeasureTotals
in interfaceBucketingData
-
fillHeaders
protected void fillHeaders(byte dimension, HeaderCell[][] headers, int level, int col, CrosstabBucketingService.CollectedList list, List<BucketDefinition.Bucket> vals, BucketingService.BucketMap totalsMap)
-
retrieveHeaderTotals
protected MeasureDefinition.MeasureValue[][] retrieveHeaderTotals(byte dimension, BucketDefinition.Bucket[] values, BucketingService.BucketMap totalsMap)
-
fillCells
protected void fillCells(CrosstabBucketingService.CollectedList[] collectedHeaders, BucketingService.BucketMap bucketMap, int level, int[] pos, List<BucketDefinition.Bucket> vals, List<BucketingService.BucketMap> bucketMaps)
-
fillCell
protected void fillCell(int[] pos, List<BucketDefinition.Bucket> vals, List<BucketingService.BucketMap> bucketMaps, MeasureDefinition.MeasureValue[] values)
-
retrieveTotals
protected MeasureDefinition.MeasureValue[][][] retrieveTotals(List<BucketDefinition.Bucket> vals, List<BucketingService.BucketMap> bucketMaps)
-
getColumnHeaders
public HeaderCell[][] getColumnHeaders()
Returns the crosstab column headers.processData()
has to be called before this.- Returns:
- the crosstab column headers
-
getRowHeaders
public HeaderCell[][] getRowHeaders()
Returns the crosstab row headers.processData()
has to be called before this.- Returns:
- the crosstab row headers
-
getCrosstabCells
public CrosstabCell[][] getCrosstabCells()
Returns the crosstab data cells.processData()
has to be called before this.- Returns:
- the crosstab data cells
-
getServiceContext
public BucketingServiceContext getServiceContext()
- Specified by:
getServiceContext
in interfaceBucketingData
-
getColumnTotalBucket
public BucketDefinition.Bucket getColumnTotalBucket(int columnGroupIndex)
- Specified by:
getColumnTotalBucket
in interfaceBucketingData
-
getColumnBucket
public BucketDefinition.Bucket getColumnBucket(int columnGroupIndex, Object value)
- Specified by:
getColumnBucket
in interfaceBucketingData
-
getMeasureValues
public MeasureDefinition.MeasureValue[] getMeasureValues(BucketingService.BucketMap bucketMap, BucketDefinition.Bucket bucket, List<BucketDefinition.Bucket> columnValues)
- Specified by:
getMeasureValues
in interfaceBucketingData
-
-