Package mondrian.rolap
Class RolapCubeLevel
- java.lang.Object
-
- mondrian.olap.OlapElementBase
-
- mondrian.olap.LevelBase
-
- mondrian.rolap.RolapLevel
-
- mondrian.rolap.RolapCubeLevel
-
- All Implemented Interfaces:
Annotated,Level,OlapElement
public class RolapCubeLevel extends RolapLevel
RolapCubeLevel wraps a RolapLevel for a specific Cube.- Author:
- Will Gorman, 19 October 2007
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classRolapCubeLevel.AllLevelReaderImplLevel reader for the level which contains the 'all' member.(package private) static interfaceRolapCubeLevel.LevelReaderEncapsulation of the difference between levels in terms of how constraints are generated.(package private) static classRolapCubeLevel.NullLevelReaderLevel reader for the level which contains the null member.(package private) static classRolapCubeLevel.ParentChildLevelReaderImplLevel reader for a parent-child level which has a closed peer level.(package private) static classRolapCubeLevel.RegularLevelReaderLevel reader for a regular level.-
Nested classes/interfaces inherited from class mondrian.rolap.RolapLevel
RolapLevel.HideMemberCondition
-
Nested classes/interfaces inherited from interface mondrian.olap.OlapElement
OlapElement.LocalizedProperty
-
-
Field Summary
Fields Modifier and Type Field Description protected RolapCubeLevel.LevelReaderlevelReader-
Fields inherited from class mondrian.rolap.RolapLevel
captionExp, FLAG_ALL, FLAG_UNIQUE, keyExp, nameExp, ordinalExp, parentExp, properties, xmlClosure
-
Fields inherited from class mondrian.olap.LevelBase
approxRowCount, depth, description, hierarchy, levelType, memberFormatter, name, uniqueName
-
Fields inherited from class mondrian.olap.OlapElementBase
caption, visible
-
-
Constructor Summary
Constructors Constructor Description RolapCubeLevel(RolapLevel level, RolapCubeHierarchy cubeHierarchy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(RolapCubeLevel level)RolapStar.ColumngetBaseStarKeyColumn(RolapCube baseCube)this method returns the RolapStar.Column if non-virtual, if virtual, find the base cube level and return it's columnStringgetCaption()Returns the display name of this catalog element.RolapCubeLevelgetChildLevel()RolapCubeLevelgetClosedPeer()RolapCubegetCube()Returns the (non virtual) cube this level belongs to.RolapCubeDimensiongetDimension()Returns the dimension of a this expression, or null if no dimension is defined.RolapCubeHierarchygetHierarchy()(package private) RolapCubeLevel.LevelReadergetLevelReader()MemberFormattergetMemberFormatter()Returns the object that is used to format members of this level.RolapCubeLevelgetParentLevel()RolapLevelgetRolapLevel()Returns the underlying level.RolapStar.ColumngetStarKeyColumn()This is the RolapStar.Column that is related to this RolapCubeLevel(package private) booleanhasClosedPeer()Returns true when the level is part of a parent/child hierarchy and has an equivalent closed level.(package private) voidinit(MondrianDef.CubeDimension xmlDimension)voidsetCaption(String caption)Sets the display name of this catalog element.voidsetStarKeyColumn(RolapStar.Column column)-
Methods inherited from class mondrian.rolap.RolapLevel
areMembersUnique, getAnnotationMap, getApproxRowCount, getCaptionExp, getDatatype, getFlags, getHideMemberCondition, getInheritedProperties, getInternalType, getKeyExp, getLogger, getNameExp, getNullParentValue, getOrdinalExp, getParentExp, getProperties, getTableAlias, getTableName, hasCaptionColumn, isAll, isParentChild, isSimple, isUnique, lookupChild, lookupChild, lookupLevel
-
Methods inherited from class mondrian.olap.LevelBase
getDepth, getDescription, getLevelType, getName, getQualifiedName, getUniqueName, isMeasure, setApproxRowCount
-
Methods inherited from class mondrian.olap.OlapElementBase
clone, computeHashCode, equals, equals, getLocalized, hashCode, isVisible, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface mondrian.olap.OlapElement
getLocalized, isVisible
-
-
-
-
Field Detail
-
levelReader
protected RolapCubeLevel.LevelReader levelReader
-
-
Constructor Detail
-
RolapCubeLevel
public RolapCubeLevel(RolapLevel level, RolapCubeHierarchy cubeHierarchy)
-
-
Method Detail
-
init
void init(MondrianDef.CubeDimension xmlDimension)
- Overrides:
initin classRolapLevel
-
setStarKeyColumn
public void setStarKeyColumn(RolapStar.Column column)
-
getStarKeyColumn
public RolapStar.Column getStarKeyColumn()
This is the RolapStar.Column that is related to this RolapCubeLevel- Returns:
- the RolapStar.Column related to this RolapCubeLevel
-
getLevelReader
RolapCubeLevel.LevelReader getLevelReader()
-
getBaseStarKeyColumn
public RolapStar.Column getBaseStarKeyColumn(RolapCube baseCube)
this method returns the RolapStar.Column if non-virtual, if virtual, find the base cube level and return it's column- Parameters:
baseCube- the base cube for the specificed virtual level- Returns:
- the RolapStar.Column related to this RolapCubeLevel
-
getCube
public final RolapCube getCube()
Returns the (non virtual) cube this level belongs to.- Returns:
- cube
-
getDimension
public final RolapCubeDimension 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- Overrides:
getDimensionin classLevelBase
-
getHierarchy
public final RolapCubeHierarchy getHierarchy()
- Specified by:
getHierarchyin interfaceLevel- Specified by:
getHierarchyin interfaceOlapElement- Overrides:
getHierarchyin classRolapLevel
-
getChildLevel
public final RolapCubeLevel getChildLevel()
- Specified by:
getChildLevelin interfaceLevel- Overrides:
getChildLevelin classLevelBase
-
getParentLevel
public final RolapCubeLevel getParentLevel()
- Specified by:
getParentLevelin interfaceLevel- Overrides:
getParentLevelin classLevelBase
-
getCaption
public String getCaption()
Description copied from class:OlapElementBaseReturns the display name of this catalog element. If no caption is defined, the name is returned.- Specified by:
getCaptionin interfaceOlapElement- Overrides:
getCaptionin classOlapElementBase
-
setCaption
public void setCaption(String caption)
Description copied from class:OlapElementBaseSets the display name of this catalog element.- Overrides:
setCaptionin classOlapElementBase
-
getRolapLevel
public RolapLevel getRolapLevel()
Returns the underlying level.- Returns:
- Underlying level
-
equals
public boolean equals(RolapCubeLevel level)
-
hasClosedPeer
boolean hasClosedPeer()
Description copied from class:RolapLevelReturns true when the level is part of a parent/child hierarchy and has an equivalent closed level.- Overrides:
hasClosedPeerin classRolapLevel
-
getClosedPeer
public RolapCubeLevel getClosedPeer()
- Overrides:
getClosedPeerin classRolapLevel
-
getMemberFormatter
public MemberFormatter getMemberFormatter()
Description copied from interface:LevelReturns the object that is used to format members of this level.- Specified by:
getMemberFormatterin interfaceLevel- Overrides:
getMemberFormatterin classLevelBase
-
-