Package mondrian.rolap.agg
Class DenseIntSegmentDataset
- java.lang.Object
-
- mondrian.rolap.agg.DenseSegmentDataset
-
- mondrian.rolap.agg.DenseNativeSegmentDataset
-
- mondrian.rolap.agg.DenseIntSegmentDataset
-
- All Implemented Interfaces:
java.lang.Iterable<java.util.Map.Entry<CellKey,java.lang.Object>>
,SegmentDataset
class DenseIntSegmentDataset extends DenseNativeSegmentDataset
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) int[]
values
-
Fields inherited from class mondrian.rolap.agg.DenseNativeSegmentDataset
nullValues
-
Fields inherited from class mondrian.rolap.agg.DenseSegmentDataset
axisMultipliers
-
-
Constructor Summary
Constructors Constructor Description DenseIntSegmentDataset(SegmentAxis[] axes, int size)
Creates a DenseIntSegmentDataset.DenseIntSegmentDataset(SegmentAxis[] axes, int[] values, java.util.BitSet nullIndicators)
Creates a populated DenseIntSegmentDataset.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SegmentBody
createSegmentBody(java.util.List<Pair<java.util.SortedSet<java.lang.Comparable>,java.lang.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.int
getInt(CellKey key)
Returns the value at a given coordinate, as anint
.protected java.lang.Integer
getObject(int offset)
java.lang.Object
getObject(CellKey pos)
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.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(int[] ordinals, int value)
void
put(CellKey key, int value)
(package private) void
set(int k, int o)
-
Methods inherited from class mondrian.rolap.agg.DenseNativeSegmentDataset
isNull, isNull
-
Methods inherited from class mondrian.rolap.agg.DenseSegmentDataset
getBytes, getDouble, getOffset, getOffset, iterator
-
-
-
-
Constructor Detail
-
DenseIntSegmentDataset
DenseIntSegmentDataset(SegmentAxis[] axes, int size)
Creates a DenseIntSegmentDataset.- Parameters:
axes
- Segment axes, containing actual column valuessize
- Number of coordinates
-
DenseIntSegmentDataset
DenseIntSegmentDataset(SegmentAxis[] axes, int[] values, java.util.BitSet nullIndicators)
Creates a populated DenseIntSegmentDataset.- Parameters:
axes
- Segment axes, containing actual column valuesvalues
- Cell values; not copiednullIndicators
- Null indicators
-
-
Method Detail
-
getInt
public int getInt(CellKey key)
Description copied from interface:SegmentDataset
Returns the value at a given coordinate, as anint
.- Specified by:
getInt
in interfaceSegmentDataset
- Overrides:
getInt
in classDenseSegmentDataset
- Parameters:
key
- Coordinate position- Returns:
- Value
-
getObject
public java.lang.Object getObject(CellKey pos)
Description copied from interface:SegmentDataset
Returns the value at a given coordinate, as anObject
.- Specified by:
getObject
in interfaceSegmentDataset
- Overrides:
getObject
in classDenseSegmentDataset
- Parameters:
pos
- Coordinate position- Returns:
- Value
-
getObject
protected java.lang.Integer getObject(int offset)
- Specified by:
getObject
in classDenseSegmentDataset
-
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
-
put
public void put(CellKey key, int value)
-
put
public void put(int[] ordinals, int value)
-
set
void set(int k, int o)
-
getSize
protected int getSize()
- Specified by:
getSize
in classDenseSegmentDataset
-
createSegmentBody
public SegmentBody createSegmentBody(java.util.List<Pair<java.util.SortedSet<java.lang.Comparable>,java.lang.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
.
-
-