Package mondrian.rolap.agg
Class DenseObjectSegmentDataset
- java.lang.Object
-
- mondrian.rolap.agg.DenseSegmentDataset
-
- mondrian.rolap.agg.DenseObjectSegmentDataset
-
- All Implemented Interfaces:
Iterable<Map.Entry<CellKey,Object>>
,SegmentDataset
class DenseObjectSegmentDataset extends DenseSegmentDataset
Implementation ofDenseSegmentDataset
that stores values of typeObject
.The storage requirements are as follows. Table requires 1 word per cell.
- Since:
- 21 March, 2002
- Author:
- jhyde
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Object[]
values
-
Fields inherited from class mondrian.rolap.agg.DenseSegmentDataset
axisMultipliers
-
-
Constructor Summary
Constructors Constructor Description DenseObjectSegmentDataset(SegmentAxis[] axes, int size)
Creates a DenseSegmentDataset.DenseObjectSegmentDataset(SegmentAxis[] axes, Object[] values)
Creates and populates a DenseSegmentDataset.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SegmentBody
createSegmentBody(List<Pair<SortedSet<Comparable>,Boolean>> axes)
Return an immutable, final and serializable implementation of a SegmentBody in order to cache this dataset.boolean
exists(CellKey pos)
Returns whether there is a value at a given coordinate.protected Object
getObject(int i)
Object
getObject(CellKey key)
Returns the value at a given coordinate, as anObject
.protected int
getSize()
SqlStatement.Type
getType()
Returns the SQL type of the data contained in this dataset.boolean
isNull(CellKey pos)
Returns whether the cell at a given coordinate is null.void
populateFrom(int[] pos, SegmentDataset data, CellKey key)
void
populateFrom(int[] pos, SegmentLoader.RowList rowList, int column)
Sets the value a given ordinal.void
put(CellKey key, Object value)
-
Methods inherited from class mondrian.rolap.agg.DenseSegmentDataset
getBytes, getDouble, getInt, getOffset, getOffset, iterator
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
values
final Object[] values
-
-
Constructor Detail
-
DenseObjectSegmentDataset
DenseObjectSegmentDataset(SegmentAxis[] axes, int size)
Creates a DenseSegmentDataset.- Parameters:
axes
- Segment axes, containing actual column valuessize
- Number of coordinates
-
DenseObjectSegmentDataset
DenseObjectSegmentDataset(SegmentAxis[] axes, Object[] values)
Creates and populates a DenseSegmentDataset. The data set is not copied.- Parameters:
axes
- Axesvalues
- Data set
-
-
Method Detail
-
getObject
public Object getObject(CellKey key)
Description copied from interface:SegmentDataset
Returns the value at a given coordinate, as anObject
.- Specified by:
getObject
in interfaceSegmentDataset
- Overrides:
getObject
in classDenseSegmentDataset
- Parameters:
key
- Coordinate position- Returns:
- Value
-
isNull
public boolean isNull(CellKey pos)
Description copied from interface:SegmentDataset
Returns whether the cell at a given coordinate is null.- Parameters:
pos
- Coordinate position- Returns:
- Whether cell value is null
-
exists
public boolean exists(CellKey pos)
Description copied from interface:SegmentDataset
Returns whether there is a value at a given coordinate.- Parameters:
pos
- Coordinate position- Returns:
- Whether there is a value
-
populateFrom
public void populateFrom(int[] pos, SegmentDataset data, CellKey key)
-
populateFrom
public void populateFrom(int[] pos, SegmentLoader.RowList rowList, int column)
Description copied from interface:SegmentDataset
Sets the value a given ordinal.- Parameters:
pos
- OrdinalrowList
- Row listcolumn
- Column of row list
-
getType
public SqlStatement.Type getType()
Description copied from interface:SegmentDataset
Returns the SQL type of the data contained in this dataset.- Returns:
- A value of SqlStatement.Type
-
getObject
protected Object getObject(int i)
- Specified by:
getObject
in classDenseSegmentDataset
-
getSize
protected int getSize()
- Specified by:
getSize
in classDenseSegmentDataset
-
createSegmentBody
public SegmentBody createSegmentBody(List<Pair<SortedSet<Comparable>,Boolean>> axes)
Description copied from interface:SegmentDataset
Return an immutable, final and serializable implementation of a SegmentBody in order to cache this dataset.- Parameters:
axes
- An array with, for each axis, the set of axis values, sorted in natural order, and a flag saying whether the null value is also present. This is supplied by theSegmentLoader
.- Returns:
- A
SegmentBody
.
-
-