| java.lang.Object net.sf.jasperreports.crosstabs.fill.calculation.BucketingService
BucketingService | public class BucketingService (Code) | | Crosstab bucketing engine.
author: Lucian Chirita (lucianc@users.sourceforge.net) version: $Id: BucketingService.java 1730 2007-05-29 16:10:55Z lucianc $ |
Inner Class :abstract protected class BucketMap | |
Inner Class :protected class BucketTreeMap extends BucketMap | |
Inner Class :protected class BucketListMap extends BucketMap | |
Inner Class :protected static class CollectedList extends LinkedList | |
Constructor Summary | |
public | BucketingService(List rowBuckets, List columnBuckets, List measures, boolean sorted, boolean[][] retrieveTotal) Creates a crosstab bucketing engine. |
Method Summary | |
public void | addData(Object[] bucketValues, Object[] measureValues) Feeds data to the engine. | protected void | addMeasure(MeasureDefinition measure, int index, List measuresList, List measureIndexList) | protected void | bucketMeasuresCreated() | protected void | checkBucketMeasureCount(int bucketMeasureCount) | protected void | checkTotals() | public void | clear() Clears all the accumulated and computed data. | protected void | collectCols(BucketListMap collectedCols, BucketMap bucketMap) | protected void | computeColumnTotal(BucketMap bucketMap) | protected void | computeRowTotals(BucketMap bucketMap) | protected void | computeTotals(BucketMap bucketMap) | protected BucketMap | createBucketMap(int level) | protected BucketListMap | createCollectBucketMap(int level) | protected void | createCrosstab() | protected HeaderCell[][] | createHeaders(byte dimension, CollectedList[] headersLists) | protected CollectedList | createHeadersList(byte dimension, BucketMap bucketMap, int level, boolean total) | protected void | fillCell(int[] pos, List vals, List bucketMaps, Map.Entry bucketEntry) | protected void | fillCells(CollectedList[] collectedHeaders, BucketMap bucketMap, int level, int[] pos, List vals, List bucketMaps) | protected void | fillHeaders(byte dimension, HeaderCell[][] headers, int level, int col, CollectedList list, List vals) | protected Bucket[] | getBucketValues(Object[] bucketValues) | public HeaderCell[][] | getColumnHeaders() Returns the crosstab column headers. | public CrosstabCell[][] | getCrosstabCells() Returns the crosstab data cells. | public MeasureValue[] | getGrandTotals() Returns the grand total measure values. | public MeasureValue[] | getMeasureValues(Bucket[] bucketValues) Returns the measure values for a set of bucket values. | public HeaderCell[][] | getRowHeaders() Returns the crosstab row headers. | protected MeasureValue[] | getUserMeasureValues(MeasureValue[] values) | public boolean | hasData() Checks whether there is any data accumulated by the engine. | protected MeasureValue[] | initMeasureValues() | protected MeasureValue[] | initUserMeasureValues() | public void | processData() Processes the data which was fed to the engine. | protected MeasureValue[][][] | retrieveTotals(List vals, List bucketMaps) | protected void | sumVals(MeasureValue[] totals, MeasureValue[] vals) |
DIMENSIONS | final protected static int DIMENSIONS(Code) | | |
DIMENSION_COLUMN | final protected static byte DIMENSION_COLUMN(Code) | | |
DIMENSION_ROW | final protected static byte DIMENSION_ROW(Code) | | |
PROPERTY_BUCKET_MEASURE_LIMIT | final public static String PROPERTY_BUCKET_MEASURE_LIMIT(Code) | | |
bucketValueMap | final protected BucketMap bucketValueMap(Code) | | |
colBucketCount | final protected int colBucketCount(Code) | | |
dataCount | protected long dataCount(Code) | | |
measureIndexes | final protected int[] measureIndexes(Code) | | |
origMeasureCount | final protected int origMeasureCount(Code) | | |
processed | protected boolean processed(Code) | | |
retrieveTotal | final protected boolean[][] retrieveTotal(Code) | | |
rowBucketCount | final protected int rowBucketCount(Code) | | |
sorted | final protected boolean sorted(Code) | | |
BucketingService | public BucketingService(List rowBuckets, List columnBuckets, List measures, boolean sorted, boolean[][] retrieveTotal)(Code) | | Creates a crosstab bucketing engine.
Parameters: rowBuckets - the row bucket definitions Parameters: columnBuckets - the column bucket definitions Parameters: measures - the measure definitions Parameters: sorted - whether the data is presorted Parameters: retrieveTotal - totals to retrieve along with the cell values |
addData | public void addData(Object[] bucketValues, Object[] measureValues) throws JRException(Code) | | Feeds data to the engine.
Parameters: bucketValues - the bucket values Parameters: measureValues - the measure values throws: JRException - |
bucketMeasuresCreated | protected void bucketMeasuresCreated()(Code) | | |
checkBucketMeasureCount | protected void checkBucketMeasureCount(int bucketMeasureCount)(Code) | | |
checkTotals | protected void checkTotals()(Code) | | |
clear | public void clear()(Code) | | Clears all the accumulated and computed data.
|
collectCols | protected void collectCols(BucketListMap collectedCols, BucketMap bucketMap) throws JRException(Code) | | |
computeColumnTotal | protected void computeColumnTotal(BucketMap bucketMap) throws JRException(Code) | | |
computeRowTotals | protected void computeRowTotals(BucketMap bucketMap) throws JRException(Code) | | |
computeTotals | protected void computeTotals(BucketMap bucketMap) throws JRException(Code) | | |
createBucketMap | protected BucketMap createBucketMap(int level)(Code) | | |
createCollectBucketMap | protected BucketListMap createCollectBucketMap(int level)(Code) | | |
createHeaders | protected HeaderCell[][] createHeaders(byte dimension, CollectedList[] headersLists)(Code) | | |
createHeadersList | protected CollectedList createHeadersList(byte dimension, BucketMap bucketMap, int level, boolean total)(Code) | | |
fillCells | protected void fillCells(CollectedList[] collectedHeaders, BucketMap bucketMap, int level, int[] pos, List vals, List bucketMaps)(Code) | | |
fillHeaders | protected void fillHeaders(byte dimension, HeaderCell[][] headers, int level, int col, CollectedList list, List vals)(Code) | | |
getBucketValues | protected Bucket[] getBucketValues(Object[] bucketValues)(Code) | | |
getGrandTotals | public MeasureValue[] getGrandTotals()(Code) | | Returns the grand total measure values.
the grand total measure values |
getMeasureValues | public MeasureValue[] getMeasureValues(Bucket[] bucketValues)(Code) | | Returns the measure values for a set of bucket values.
Parameters: bucketValues - the bucket values the measure values corresponding to the bucket values |
getUserMeasureValues | protected MeasureValue[] getUserMeasureValues(MeasureValue[] values)(Code) | | |
hasData | public boolean hasData()(Code) | | Checks whether there is any data accumulated by the engine.
true iff the engine has any accumulated data |
initMeasureValues | protected MeasureValue[] initMeasureValues()(Code) | | |
initUserMeasureValues | protected MeasureValue[] initUserMeasureValues()(Code) | | |
processData | public void processData() throws JRException(Code) | | Processes the data which was fed to the engine.
This method should be called after the data has been exhausted.
The processing consists of total calculations and crosstab table creation.
throws: JRException - |
retrieveTotals | protected MeasureValue[][][] retrieveTotals(List vals, List bucketMaps)(Code) | | |
sumVals | protected void sumVals(MeasureValue[] totals, MeasureValue[] vals) throws JRException(Code) | | |
|
|