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
Modifier and TypeFieldDescriptionprotected final String
protected DimensionType
protected Hierarchy[]
protected final boolean
protected final String
protected final String
Fields inherited from class mondrian.olap.OlapElementBase
caption, visible
Fields inherited from interface mondrian.olap.Dimension
MEASURES_NAME, MEASURES_UNIQUE_NAME
-
Constructor Summary
ModifierConstructorDescriptionprotected
DimensionBase
(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.StandardDimension
orDimensionType.TimeDimension
Returns 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'".boolean
Returns whether the dimension should be considered as a "high cardinality" or "low cardinality" according to cube definition.boolean
Returns 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, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface mondrian.olap.Annotated
getAnnotationMap
Methods 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:
getUniqueName
in interfaceOlapElement
-
getName
- Specified by:
getName
in interfaceOlapElement
-
getDescription
- Specified by:
getDescription
in interfaceOlapElement
-
getHierarchies
Description copied from interface:Dimension
Returns an array of the hierarchies which belong to this dimension.- Specified by:
getHierarchies
in interfaceDimension
-
getHierarchy
- Specified by:
getHierarchy
in interfaceOlapElement
-
getDimension
Description copied from interface:OlapElement
Returns 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:
getDimension
in interfaceOlapElement
-
getDimensionType
Description copied from interface:Dimension
Returns the type of this dimension (DimensionType.StandardDimension
orDimensionType.TimeDimension
- Specified by:
getDimensionType
in interfaceDimension
-
getQualifiedName
Description copied from interface:OlapElement
Returns the name of this element qualified by its class, for example "hierarchy 'Customers'".- Specified by:
getQualifiedName
in interfaceOlapElement
-
isMeasures
public boolean isMeasures()Description copied from interface:Dimension
Returns whether this is the[Measures]
dimension.- Specified by:
isMeasures
in interfaceDimension
-
lookupChild
Description copied from interface:OlapElement
Looks up a child element, returning null if it does not exist.- Specified by:
lookupChild
in interfaceOlapElement
-
isHighCardinality
public boolean isHighCardinality()Description copied from interface:Dimension
Returns 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:
isHighCardinality
in interfaceDimension
- Returns:
- whether this dimension is high-cardinality
-