Class SortedMergeCrosstabSpecification
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.states.crosstab.SortedMergeCrosstabSpecification
-
- All Implemented Interfaces:
Serializable
,CrosstabSpecification
public class SortedMergeCrosstabSpecification extends Object implements CrosstabSpecification
Computed structural data of a crosstab. It basically contains the full dataset of the column axis, which then allows us to inject artificial rows into the dataset. This mode uses the order in which elements occur in the datastream as normalized order of dimension elements, and if there is ambiguity, it sorts elements by their natural order as well. We have the assumption, that the data is already pre-sorted in some way and that all rows are given in that order. We assume that all items are comparable and that the items are sorted according to the natural order of the key. This mode is intended to be used for raw-data crosstabs only. It consumes less memory than the ordered merge.- Author:
- Thomas Morgner
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SortedMergeCrosstabSpecification(ReportStateKey key, String[] dimensionColumnSet, String[] rowColumnSet)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(DataRow dataRow)
void
endCrosstab()
void
endRow()
String[]
getColumnDimensionNames()
ReportStateKey
getKey()
Object[]
getKeyAt(int column)
String[]
getRowDimensionNames()
int
indexOf(int start, Object[] key)
int
size()
The number of columns encountered.void
startRow()
-
-
-
Constructor Detail
-
SortedMergeCrosstabSpecification
public SortedMergeCrosstabSpecification(ReportStateKey key, String[] dimensionColumnSet, String[] rowColumnSet)
-
-
Method Detail
-
indexOf
public int indexOf(int start, Object[] key)
- Specified by:
indexOf
in interfaceCrosstabSpecification
-
getColumnDimensionNames
public String[] getColumnDimensionNames()
- Specified by:
getColumnDimensionNames
in interfaceCrosstabSpecification
-
getRowDimensionNames
public String[] getRowDimensionNames()
- Specified by:
getRowDimensionNames
in interfaceCrosstabSpecification
-
getKey
public ReportStateKey getKey()
- Specified by:
getKey
in interfaceCrosstabSpecification
-
startRow
public void startRow()
- Specified by:
startRow
in interfaceCrosstabSpecification
-
endRow
public void endRow()
- Specified by:
endRow
in interfaceCrosstabSpecification
-
endCrosstab
public void endCrosstab()
- Specified by:
endCrosstab
in interfaceCrosstabSpecification
-
add
public void add(DataRow dataRow)
- Specified by:
add
in interfaceCrosstabSpecification
-
size
public int size()
Description copied from interface:CrosstabSpecification
The number of columns encountered.- Specified by:
size
in interfaceCrosstabSpecification
- Returns:
-
getKeyAt
public Object[] getKeyAt(int column)
- Specified by:
getKeyAt
in interfaceCrosstabSpecification
-
-