|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmondrian.rolap.agg.SegmentBuilder
public class SegmentBuilder
Helper class that contains methods to convert between
Segment and SegmentHeader, and also
SegmentWithData and SegmentBody.
| Nested Class Summary | |
|---|---|
static interface |
SegmentBuilder.SegmentConverter
Functor to convert a segment header and body into a SegmentWithData. |
static class |
SegmentBuilder.SegmentConverterImpl
Implementation of SegmentBuilder.SegmentConverter that uses an
AggregationKey
and CellRequest as context to
convert a SegmentHeader. |
static class |
SegmentBuilder.StarSegmentConverter
Implementation of SegmentBuilder.SegmentConverter that uses a star measure
and a list of StarPredicate. |
| Constructor Summary | |
|---|---|
SegmentBuilder()
|
|
| Method Summary | |
|---|---|
static SegmentWithData |
addData(Segment segment,
SegmentBody sb)
Converts a segment plus a SegmentBody into a
SegmentWithData. |
static boolean |
isSubset(SegmentHeader header,
Segment segment)
Tells if the passed segment is a subset of this segment and could be used for a rollup in cache operation. |
static Pair<SegmentHeader,SegmentBody> |
rollup(Map<SegmentHeader,SegmentBody> map,
Set<String> keepColumns,
BitKey targetBitkey,
Aggregator rollupAggregator)
Given a collection of segments, all of the same dimensionality, rolls up to create a segment with reduced dimensionality. |
static List<SegmentColumn> |
toConstrainedColumns(Collection<StarColumnPredicate> predicates)
|
static List<SegmentColumn> |
toConstrainedColumns(StarColumnPredicate[] predicates)
|
static SegmentHeader |
toHeader(Segment segment)
Creates a SegmentHeader object describing the supplied Segment object. |
static Segment |
toSegment(SegmentHeader header,
RolapStar star,
BitKey constrainedColumnsBitKey,
RolapStar.Column[] constrainedColumns,
RolapStar.Measure measure,
List<StarPredicate> compoundPredicates)
Creates a segment from a SegmentHeader. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SegmentBuilder()
| Method Detail |
|---|
public static SegmentWithData addData(Segment segment,
SegmentBody sb)
SegmentBody into a
SegmentWithData.
segment - Segmentsb - Segment body
public static Segment toSegment(SegmentHeader header,
RolapStar star,
BitKey constrainedColumnsBitKey,
RolapStar.Column[] constrainedColumns,
RolapStar.Measure measure,
List<StarPredicate> compoundPredicates)
header - The header to convert.star - StarconstrainedColumnsBitKey - Constrained columnsconstrainedColumns - Constrained columnsmeasure - Measure
public static Pair<SegmentHeader,SegmentBody> rollup(Map<SegmentHeader,SegmentBody> map,
Set<String> keepColumns,
BitKey targetBitkey,
Aggregator rollupAggregator)
map - Source segment headers and bodieskeepColumns - A list of column names to keep as part of
the rolled up segment.targetBitkey - The column bit key to match with the
resulting segment.rollupAggregator - The aggregator to use to rollup.
public static boolean isSubset(SegmentHeader header,
Segment segment)
segment - A segment which might be a subset of the
current segment.
public static List<SegmentColumn> toConstrainedColumns(StarColumnPredicate[] predicates)
public static List<SegmentColumn> toConstrainedColumns(Collection<StarColumnPredicate> predicates)
public static SegmentHeader toHeader(Segment segment)
segment - A segment object for which we want to generate
a SegmentHeader.
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||