|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mondrian.olap.OlapElementBase mondrian.olap.DimensionBase mondrian.rolap.RolapDimension
class RolapDimension
RolapDimension
implements Dimension
for a ROLAP
database.
RolapEvaluator
needs each dimension to have an ordinal, so that it
can store the evaluation context as an array of members.
The ordinal of a dimension within a particular cube is found by
calling getOrdinal(Cube)
. Ordinals
are contiguous and zero-based. Zero is always the [Measures]
dimension.
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()
), and Cube
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 no
getCube()
method.)
Furthermore, since members are created by a MemberReader
which
belongs to the RolapHierarchy
, you will the members will be the same
too. For example, if you query [Product].[Beer]
from the
Sales
and Warehouse
cubes, you will get the
same RolapMember
object.
(RolapSchema.mapSharedHierarchyToReader
holds the mapping. I don't
know whether it's still necessary.)
Field Summary |
---|
Fields inherited from class mondrian.olap.DimensionBase |
---|
description, dimensionType, hierarchies, highCardinality, name, uniqueName |
Fields inherited from class mondrian.olap.OlapElementBase |
---|
caption |
Fields inherited from interface mondrian.olap.Dimension |
---|
MEASURES_NAME, MEASURES_UNIQUE_NAME |
Constructor Summary | |
---|---|
RolapDimension(RolapSchema schema,
RolapCube cube,
MondrianDef.Dimension xmlDimension,
MondrianDef.CubeDimension xmlCubeDimension)
Creates a dimension from an XML definition. |
|
RolapDimension(Schema schema,
String name,
DimensionType dimensionType,
boolean highCardinality)
|
Method Summary | |
---|---|
Hierarchy |
getHierarchy()
Returns the hierarchy of an expression. |
protected org.apache.log4j.Logger |
getLogger()
|
int |
getOrdinal(Cube cube)
Returns dimension's ordinal within a given cube. |
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)
|
Methods inherited from class mondrian.olap.DimensionBase |
---|
getDescription, getDimension, getDimensionType, getHierarchies, getName, getQualifiedName, getUniqueName, isHighCardinality, isMeasures, lookupChild, lookupChild, usesDimension |
Methods inherited from class mondrian.olap.OlapElementBase |
---|
clone, computeHashCode, equals, equals, getCaption, hashCode, setCaption, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface mondrian.olap.OlapElement |
---|
getCaption |
Constructor Detail |
---|
RolapDimension(Schema schema, String name, DimensionType dimensionType, boolean highCardinality)
RolapDimension(RolapSchema schema, RolapCube cube, MondrianDef.Dimension xmlDimension, MondrianDef.CubeDimension xmlCubeDimension)
Method Detail |
---|
protected org.apache.log4j.Logger getLogger()
getLogger
in class OlapElementBase
void init(MondrianDef.CubeDimension xmlDimension)
RolapHierarchy newHierarchy(String subName, boolean hasAll)
public Hierarchy getHierarchy()
In this case, the expression is a dimension, so the hierarchy is the dimension's default hierarchy (its first).
getHierarchy
in interface OlapElement
getHierarchy
in class DimensionBase
public int getOrdinal(Cube cube)
Dimension
[Measures]
always has ordinal 0.
public Schema getSchema()
Dimension
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |