Class RolapDimension
- java.lang.Object
-
- mondrian.olap.OlapElementBase
-
- mondrian.olap.DimensionBase
-
- mondrian.rolap.RolapDimension
-
- All Implemented Interfaces:
Annotated
,Dimension
,OlapElement
- Direct Known Subclasses:
RolapCubeDimension
class RolapDimension extends DimensionBase
RolapDimension
implementsDimension
for a ROLAP database.Topic: Dimension ordinals
RolapEvaluator
needs each dimension to have an ordinal, so that it can store the evaluation context as an array of members.A dimension may be either shared or private to a particular cube. The dimension object doesn't actually know which;
Schema
has a list of shared hierarchies (Schema.getSharedHierarchies()
), andCube
has a list of dimensions (Cube.getDimensions()
).If a dimension is shared between several cubes, the
Dimension
objects which represent them may (or may not be) the same. (That's why there's nogetCube()
method.)Furthermore, since members are created by a
MemberReader
which belongs to theRolapHierarchy
, you will the members will be the same too. For example, if you query[Product].[Beer]
from theSales
andWarehouse
cubes, you will get the sameRolapMember
object. (RolapSchema.mapSharedHierarchyToReader
holds the mapping. I don't know whether it's still necessary.)- Since:
- 10 August, 2001
- Author:
- jhyde
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface mondrian.olap.OlapElement
OlapElement.LocalizedProperty
-
-
Field Summary
-
Fields inherited from class mondrian.olap.DimensionBase
description, dimensionType, hierarchies, highCardinality, name, uniqueName
-
Fields inherited from class mondrian.olap.OlapElementBase
caption, visible
-
Fields inherited from interface mondrian.olap.Dimension
MEASURES_NAME, MEASURES_UNIQUE_NAME
-
-
Constructor Summary
Constructors Constructor Description RolapDimension(Schema schema, String name, String caption, boolean visible, String description, DimensionType dimensionType, boolean highCardinality, Map<String,Annotation> annotationMap)
RolapDimension(RolapSchema schema, RolapCube cube, MondrianDef.Dimension xmlDimension, MondrianDef.CubeDimension xmlCubeDimension)
Creates a dimension from an XML definition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Annotation>
getAnnotationMap()
Returns a list of annotations.Hierarchy
getHierarchy()
Returns the hierarchy of an expression.protected org.apache.log4j.Logger
getLogger()
Schema
getSchema()
Returns the schema this dimension belongs to.(package private) void
init(MondrianDef.CubeDimension xmlDimension)
Initializes a dimension within the context of a cube.(package private) RolapHierarchy
newHierarchy(String subName, boolean hasAll, RolapHierarchy closureFor)
Creates a hierarchy.-
Methods inherited from class mondrian.olap.DimensionBase
getDescription, getDimension, getDimensionType, getHierarchies, getName, getQualifiedName, getUniqueName, isHighCardinality, isMeasures, lookupChild
-
Methods inherited from class mondrian.olap.OlapElementBase
clone, computeHashCode, equals, equals, getCaption, getLocalized, hashCode, isVisible, setCaption, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface mondrian.olap.OlapElement
getCaption, getLocalized, isVisible
-
-
-
-
Constructor Detail
-
RolapDimension
RolapDimension(Schema schema, String name, String caption, boolean visible, String description, DimensionType dimensionType, boolean highCardinality, Map<String,Annotation> annotationMap)
-
RolapDimension
RolapDimension(RolapSchema schema, RolapCube cube, MondrianDef.Dimension xmlDimension, MondrianDef.CubeDimension xmlCubeDimension)
Creates a dimension from an XML definition.- Pre-condition:
- schema != null
-
-
Method Detail
-
getLogger
protected org.apache.log4j.Logger getLogger()
- Specified by:
getLogger
in classOlapElementBase
-
init
void init(MondrianDef.CubeDimension xmlDimension)
Initializes a dimension within the context of a cube.
-
newHierarchy
RolapHierarchy newHierarchy(String subName, boolean hasAll, RolapHierarchy closureFor)
Creates a hierarchy.- Parameters:
subName
- Name of this hierarchy.hasAll
- Whether hierarchy has an 'all' memberclosureFor
- Hierarchy for which the new hierarchy is a closure; null for regular hierarchies- Returns:
- Hierarchy
-
getHierarchy
public Hierarchy getHierarchy()
Returns the hierarchy of an expression.In this case, the expression is a dimension, so the hierarchy is the dimension's default hierarchy (its first).
- Specified by:
getHierarchy
in interfaceOlapElement
- Overrides:
getHierarchy
in classDimensionBase
-
getSchema
public Schema getSchema()
Description copied from interface:Dimension
Returns the schema this dimension belongs to.
-
getAnnotationMap
public Map<String,Annotation> getAnnotationMap()
Description copied from interface:Annotated
Returns a list of annotations.The map may be empty, never null.
- Returns:
- Map from annotation name to annotations.
-
-