Package mondrian.olap
Class DimensionBase
- java.lang.Object
-
- mondrian.olap.OlapElementBase
-
- mondrian.olap.DimensionBase
-
- All Implemented Interfaces:
Annotated,Dimension,OlapElement
- Direct Known Subclasses:
RolapCubeDimension
public abstract class DimensionBase extends OlapElementBase implements Dimension
Abstract implementation for aDimension.- Since:
- 6 August, 2001
- Author:
- jhyde
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface mondrian.olap.OlapElement
OlapElement.LocalizedProperty
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringdescriptionprotected DimensionTypedimensionTypeprotected Hierarchy[]hierarchiesprotected booleanhighCardinalityprotected Stringnameprotected StringuniqueName-
Fields inherited from class mondrian.olap.OlapElementBase
caption, visible
-
Fields inherited from interface mondrian.olap.Dimension
MEASURES_NAME, MEASURES_UNIQUE_NAME
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDimensionBase(String name, String caption, boolean visible, String description, DimensionType dimensionType, boolean highCardinality)Creates a DimensionBase.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDescription()DimensiongetDimension()Returns the dimension of a this expression, or null if no dimension is defined.DimensionTypegetDimensionType()Returns the type of this dimension (DimensionType.StandardDimensionorDimensionType.TimeDimensionHierarchy[]getHierarchies()Returns an array of the hierarchies which belong to this dimension.HierarchygetHierarchy()StringgetName()StringgetQualifiedName()Returns the name of this element qualified by its class, for example "hierarchy 'Customers'".StringgetUniqueName()booleanisHighCardinality()Returns whether the dimension should be considered as a "high cardinality" or "low cardinality" according to cube definition.booleanisMeasures()Returns whether this is the[Measures]dimension.OlapElementlookupChild(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 Detail
-
name
protected final String name
-
uniqueName
protected final String uniqueName
-
description
protected final String description
-
highCardinality
protected final boolean highCardinality
-
hierarchies
protected Hierarchy[] hierarchies
-
dimensionType
protected DimensionType dimensionType
-
-
Constructor Detail
-
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 Detail
-
getUniqueName
public String getUniqueName()
- Specified by:
getUniqueNamein interfaceOlapElement
-
getName
public String getName()
- Specified by:
getNamein interfaceOlapElement
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceOlapElement
-
getHierarchies
public Hierarchy[] getHierarchies()
Description copied from interface:DimensionReturns an array of the hierarchies which belong to this dimension.- Specified by:
getHierarchiesin interfaceDimension
-
getHierarchy
public Hierarchy getHierarchy()
- Specified by:
getHierarchyin interfaceOlapElement
-
getDimension
public Dimension 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
public DimensionType getDimensionType()
Description copied from interface:DimensionReturns the type of this dimension (DimensionType.StandardDimensionorDimensionType.TimeDimension- Specified by:
getDimensionTypein interfaceDimension
-
getQualifiedName
public String 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
public OlapElement lookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType)
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
-
-