Package mondrian.rolap.agg
Class SegmentWithData
java.lang.Object
mondrian.rolap.agg.Segment
mondrian.rolap.agg.SegmentWithData
Extension to
Segment
with a data set.- Author:
- jhyde
-
Nested Class Summary
Nested classes/interfaces inherited from class mondrian.rolap.agg.Segment
Segment.ExcludedRegion
-
Field Summary
Fields inherited from class mondrian.rolap.agg.Segment
columns, compoundPredicateList, constrainedColumnsBitKey, excludedRegions, measure, predicates, star
-
Constructor Summary
ConstructorDescriptionSegmentWithData
(Segment segment, SegmentDataset data, SegmentAxis[] axes) Creates a SegmentWithData from an existing Segment. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
describeAxes
(StringBuilder buf, int i, boolean values) int
Returns the number of cells in this Segment, deducting cells in excluded regions.getCellValue
(Object[] keys) Retrieves the value at the location identified bykeys
.final SegmentDataset
getData()
Returns the data set.Methods inherited from class mondrian.rolap.agg.Segment
getColumns, getCompoundPredicateList, getConstrainedColumnsBitKey, getExcludedRegions, getHeader, getStar, isExcluded, matches, print, toString
-
Constructor Details
-
SegmentWithData
Creates a SegmentWithData from an existing Segment.- Parameters:
segment
- Segment (without data)data
- Data set
-
-
Method Details
-
describeAxes
- Overrides:
describeAxes
in classSegment
-
getCellValue
Retrieves the value at the location identified bykeys
.Returns
Util.nullValue
if the cell value is null (because no fact table rows met those criteria);null
if the value is not supposed to be in this segment (because one or more of the keys do not pass the axis criteria);- the data value otherwise
- See Also:
-
getCellCount
public int getCellCount()Returns the number of cells in this Segment, deducting cells in excluded regions.This method may return a value which is slightly too low, or occasionally even negative. This occurs when a Segment has more than one excluded region, and those regions overlap. Cells which are in both regions will be counted twice.
- Returns:
- Number of cells in this Segment
-
getData
Returns the data set.
WARNING: the returned SegmentDataset reference should not be modified; it is assumed to be invariant.
- Returns:
- The
data
reference
-