mondrian.rolap.agg
Interface SegmentDataset

All Superinterfaces:
Iterable<Map.Entry<CellKey,Object>>
All Known Implementing Classes:
DenseDoubleSegmentDataset, DenseIntSegmentDataset, DenseNativeSegmentDataset, DenseObjectSegmentDataset, DenseSegmentDataset, SparseSegmentDataset

public interface SegmentDataset
extends Iterable<Map.Entry<CellKey,Object>>

A SegmentDataset holds the values in a segment.

Since:
21 March, 2002
Author:
jhyde

Method Summary
 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.
 double getBytes()
          Returns the number of bytes occupied by this dataset.
 double getDouble(CellKey pos)
          Returns the value at a given coordinate, as a double.
 int getInt(CellKey pos)
          Returns the value at a given coordinate, as an int.
 Object getObject(CellKey pos)
          Returns the value at a given coordinate, as an Object.
 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.
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getObject

Object getObject(CellKey pos)
Returns the value at a given coordinate, as an Object.

Parameters:
pos - Coordinate position
Returns:
Value

getInt

int getInt(CellKey pos)
Returns the value at a given coordinate, as an int.

Parameters:
pos - Coordinate position
Returns:
Value

getDouble

double getDouble(CellKey pos)
Returns the value at a given coordinate, as a double.

Parameters:
pos - Coordinate position
Returns:
Value

isNull

boolean isNull(CellKey pos)
Returns whether the cell at a given coordinate is null.

Parameters:
pos - Coordinate position
Returns:
Whether cell value is null

exists

boolean exists(CellKey pos)
Returns whether there is a value at a given coordinate.

Parameters:
pos - Coordinate position
Returns:
Whether there is a value

getBytes

double getBytes()
Returns the number of bytes occupied by this dataset.

Returns:
number of bytes

populateFrom

void populateFrom(int[] pos,
                  SegmentDataset data,
                  CellKey key)

populateFrom

void populateFrom(int[] pos,
                  SegmentLoader.RowList rowList,
                  int column)
Sets the value a given ordinal.

Parameters:
pos - Ordinal
rowList - Row list
column - Column of row list

getType

SqlStatement.Type getType()
Returns the SQL type of the data contained in this dataset.

Returns:
A value of SqlStatement.Type

createSegmentBody

SegmentBody createSegmentBody(List<Pair<SortedSet<Comparable>,Boolean>> axes)
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 the SegmentLoader.
Returns:
A SegmentBody.

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads