Package mondrian.olap
Class DimensionBase
java.lang.Object
mondrian.olap.OlapElementBase
mondrian.olap.DimensionBase
- All Implemented Interfaces:
Annotated,Dimension,OlapElement
- Direct Known Subclasses:
RolapCubeDimension
Abstract implementation for a
Dimension.- Since:
- 6 August, 2001
- Author:
- jhyde
-
Nested Class Summary
Nested classes/interfaces inherited from interface mondrian.olap.OlapElement
OlapElement.LocalizedProperty -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected DimensionTypeprotected Hierarchy[]protected final booleanprotected final Stringprotected final StringFields inherited from class mondrian.olap.OlapElementBase
caption, visibleFields inherited from interface mondrian.olap.Dimension
MEASURES_NAME, MEASURES_UNIQUE_NAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDimensionBase(String name, String caption, boolean visible, String description, DimensionType dimensionType, boolean highCardinality) Creates a DimensionBase. -
Method Summary
Modifier and TypeMethodDescriptionReturns the dimension of a this expression, or null if no dimension is defined.Returns the type of this dimension (DimensionType.StandardDimensionorDimensionType.TimeDimensionReturns an array of the hierarchies which belong to this dimension.getName()Returns the name of this element qualified by its class, for example "hierarchy 'Customers'".booleanReturns whether the dimension should be considered as a "high cardinality" or "low cardinality" according to cube definition.booleanReturns whether this is the[Measures]dimension.lookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType) Looks up a child element, returning null if it does not exist.Methods inherited from class mondrian.olap.OlapElementBase
clone, computeHashCode, equals, equals, getCaption, getLocalized, getLogger, hashCode, isVisible, setCaption, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface mondrian.olap.Annotated
getAnnotationMapMethods inherited from interface mondrian.olap.OlapElement
getCaption, getLocalized, isVisible
-
Field Details
-
name
-
uniqueName
-
description
-
highCardinality
protected final boolean highCardinality -
hierarchies
-
dimensionType
-
-
Constructor Details
-
DimensionBase
protected DimensionBase(String name, String caption, boolean visible, String description, DimensionType dimensionType, boolean highCardinality) Creates a DimensionBase.- Parameters:
name- NamedimensionType- TypehighCardinality- Whether high-cardinality
-
-
Method Details
-
getUniqueName
- Specified by:
getUniqueNamein interfaceOlapElement
-
getName
- Specified by:
getNamein interfaceOlapElement
-
getDescription
- Specified by:
getDescriptionin interfaceOlapElement
-
getHierarchies
Description copied from interface:DimensionReturns an array of the hierarchies which belong to this dimension.- Specified by:
getHierarchiesin interfaceDimension
-
getHierarchy
- Specified by:
getHierarchyin interfaceOlapElement
-
getDimension
Description copied from interface:OlapElementReturns the dimension of a this expression, or null if no dimension is defined. Applicable only to set expressions.Example 1:
has dimension[Sales].children
[Sales].Example 2:
has dimension [Promotion Media].order(except([Promotion Media].[Media Type].members, {[Promotion Media].[Media Type].[No Media]}), [Measures].[Unit Sales], DESC)Example 3:
has no dimension (well, actually it is [Product] x [Gender], but we can't represent that, so we return null);CrossJoin([Product].[Product Department].members, [Gender].members)- Specified by:
getDimensionin interfaceOlapElement
-
getDimensionType
Description copied from interface:DimensionReturns the type of this dimension (DimensionType.StandardDimensionorDimensionType.TimeDimension- Specified by:
getDimensionTypein interfaceDimension
-
getQualifiedName
Description copied from interface:OlapElementReturns the name of this element qualified by its class, for example "hierarchy 'Customers'".- Specified by:
getQualifiedNamein interfaceOlapElement
-
isMeasures
public boolean isMeasures()Description copied from interface:DimensionReturns whether this is the[Measures]dimension.- Specified by:
isMeasuresin interfaceDimension
-
lookupChild
Description copied from interface:OlapElementLooks up a child element, returning null if it does not exist.- Specified by:
lookupChildin interfaceOlapElement
-
isHighCardinality
public boolean isHighCardinality()Description copied from interface:DimensionReturns whether the dimension should be considered as a "high cardinality" or "low cardinality" according to cube definition.Mondrian tends to evaluate high cardinality dimensions using iterators rather than lists, avoiding instantiating the dimension in memory.
- Specified by:
isHighCardinalityin interfaceDimension- Returns:
- whether this dimension is high-cardinality
-