Package mondrian.rolap
Class RolapCubeHierarchy
java.lang.Object
mondrian.olap.OlapElementBase
mondrian.olap.HierarchyBase
mondrian.rolap.RolapHierarchy
mondrian.rolap.RolapCubeHierarchy
- All Implemented Interfaces:
 Annotated,Hierarchy,OlapElement
Hierarchy that is associated with a specific Cube.
- Author:
 - Will Gorman, 19 October 2007
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassmember reader wrapper - uses existing member reader, but wraps and caches all intermediate members.classSame asRolapCubeHierarchy.RolapCubeHierarchyMemberReaderbut without caching anything.static interfaceTODO: Since this is part of a caching strategy, should be implemented as a Strategy Pattern, avoiding hierarchy.static classNested classes/interfaces inherited from class mondrian.rolap.RolapHierarchy
RolapHierarchy.LimitedRollupMember, RolapHierarchy.RolapCalculatedMeasureNested classes/interfaces inherited from interface mondrian.olap.OlapElement
OlapElement.LocalizedProperty - 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanTrue if the hierarchy is degenerate - has no dimension table of its own, just drives from the cube's fact table.Fields inherited from class mondrian.rolap.RolapHierarchy
nullLevel, relation, xmlHierarchyFields inherited from class mondrian.olap.HierarchyBase
allLevelName, allMemberName, description, dimension, hasAll, levels, name, subName, uniqueNameFields inherited from class mondrian.olap.OlapElementBase
caption, visible - 
Constructor Summary
ConstructorsConstructorDescriptionRolapCubeHierarchy(RolapCubeDimension cubeDimension, MondrianDef.CubeDimension cubeDim, RolapHierarchy rolapHierarchy, String subName, int ordinal) Creates a RolapCubeHierarchy.RolapCubeHierarchy(RolapCubeDimension cubeDimension, MondrianDef.CubeDimension cubeDim, RolapHierarchy rolapHierarchy, String subName, int ordinal, RolapCube factCube) Creates a RolapCubeHierarchy. - 
Method Summary
Modifier and TypeMethodDescriptionprotected intComputes this object's hash code.createMember(Member parent, Level level, String name, Formula formula) Creates a member of this hierarchy.booleanprotected voidextractNewAliases(MondrianDef.RelationOrJoin oldrel, MondrianDef.RelationOrJoin newrel) Populates the alias map for the old and new relations.Returns the name of the 'all' level in this hierarchy.Returns the 'all' member.final RolapCubegetCube()final RolapCubeMemberReturns the default member of this hierarchy.Returns the levels in this hierarchy.Returns a special member representing the "null" value.final intReturns the ordinal of this hierarchy in its cube.The currentRelation object is derived from the shared relation object it is generated via the RolapStar object, and contains unique aliases for its particular join pathfinal RolapHierarchyReturns the name of the source hierarchy, if this hierarchy is shared, otherwise null.booleanlookupAlias(String origTable) voidsetDefaultMember(Member defaultMeasure) Sets default member of this Hierarchy.Methods inherited from class mondrian.rolap.RolapHierarchy
createAnnotationMap, getAnnotationMap, getDisplayFolder, getLogger, getRolapSchema, getUniqueKeyLevelName, getXmlHierarchy, isRaggedMethods inherited from class mondrian.olap.HierarchyBase
equals, getDescription, getDimension, getHierarchy, getName, getQualifiedName, getSubName, getUniqueName, getUniqueNameSsas, hasAll, lookupChildMethods inherited from class mondrian.olap.OlapElementBase
clone, getCaption, getLocalized, hashCode, isVisible, setCaption, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface mondrian.olap.OlapElement
getCaption, getLocalized, isVisible 
- 
Field Details
- 
usingCubeFact
protected final boolean usingCubeFactTrue if the hierarchy is degenerate - has no dimension table of its own, just drives from the cube's fact table. 
 - 
 - 
Constructor Details
- 
RolapCubeHierarchy
public RolapCubeHierarchy(RolapCubeDimension cubeDimension, MondrianDef.CubeDimension cubeDim, RolapHierarchy rolapHierarchy, String subName, int ordinal) Creates a RolapCubeHierarchy.- Parameters:
 cubeDimension- DimensioncubeDim- XML dimension elementrolapHierarchy- Wrapped hierarchysubName- Name of hierarchy within dimensionordinal- Ordinal of hierarchy within cube
 - 
RolapCubeHierarchy
public RolapCubeHierarchy(RolapCubeDimension cubeDimension, MondrianDef.CubeDimension cubeDim, RolapHierarchy rolapHierarchy, String subName, int ordinal, RolapCube factCube) Creates a RolapCubeHierarchy.- Parameters:
 cubeDimension- DimensioncubeDim- XML dimension elementrolapHierarchy- Wrapped hierarchysubName- Name of hierarchy within dimensionordinal- Ordinal of hierarchy within cubefactCube- Optional - specified for virtual cube dimension
 
 - 
 - 
Method Details
- 
getLevels
Description copied from interface:HierarchyReturns the levels in this hierarchy.If a hierarchy is subject to access-control, some of the levels may not be visible; use
SchemaReader.getHierarchyLevels(mondrian.olap.Hierarchy)instead.- Specified by:
 getLevelsin interfaceHierarchy- Overrides:
 getLevelsin classHierarchyBase
 - 
getAllMemberName
- Overrides:
 getAllMemberNamein classHierarchyBase
 - 
getAllLevelName
Description copied from class:HierarchyBaseReturns the name of the 'all' level in this hierarchy.- Overrides:
 getAllLevelNamein classHierarchyBase- Returns:
 - name of the 'all' level
 
 - 
isUsingCubeFact
public boolean isUsingCubeFact() - 
lookupAlias
 - 
getRolapHierarchy
 - 
getOrdinalInCube
public final int getOrdinalInCube()Description copied from class:RolapHierarchyReturns the ordinal of this hierarchy in its cube.Temporarily defined against RolapHierarchy; will be moved to RolapCubeHierarchy as soon as the measures hierarchy is a RolapCubeHierarchy.
- Overrides:
 getOrdinalInCubein classRolapHierarchy- Returns:
 - Ordinal of this hierarchy in its cube
 
 - 
extractNewAliases
protected void extractNewAliases(MondrianDef.RelationOrJoin oldrel, MondrianDef.RelationOrJoin newrel) Populates the alias map for the old and new relations.This method may be simplified when we obsolete
HierarchyUsage.- Parameters:
 oldrel- Original relation, as defined in the schemanewrel- New star relation, generated by RolapStar, canonical, and shared between all cubes with similar structure
 - 
equals
- Overrides:
 equalsin classRolapHierarchy
 - 
computeHashCode
protected int computeHashCode()Description copied from class:OlapElementBaseComputes this object's hash code. Called at most once.- Overrides:
 computeHashCodein classRolapHierarchy- Returns:
 - hash code
 
 - 
createMember
Description copied from interface:HierarchyCreates a member of this hierarchy. If this is the measures hierarchy, a calculated member is created, andformulamust not be null.- Specified by:
 createMemberin interfaceHierarchy- Overrides:
 createMemberin classRolapHierarchy
 - 
getRelation
The currentRelation object is derived from the shared relation object it is generated via the RolapStar object, and contains unique aliases for its particular join path- Overrides:
 getRelationin classRolapHierarchy- Returns:
 - rolap cube hierarchy relation
 
 - 
getDefaultMember
Description copied from interface:HierarchyReturns the default member of this hierarchy.If a hierarchy is subject to access-control, the default member may not be visible, so use
SchemaReader.getHierarchyDefaultMember(mondrian.olap.Hierarchy).- Specified by:
 getDefaultMemberin interfaceHierarchy- Overrides:
 getDefaultMemberin classRolapHierarchy
 - 
getNullMember
Description copied from interface:HierarchyReturns a special member representing the "null" value. This never occurs on an axis, but may occur if functions such asLead,NextMemberandParentMemberwalk off the end of the hierarchy.- Specified by:
 getNullMemberin interfaceHierarchy- Overrides:
 getNullMemberin classRolapHierarchy
 - 
getAllMember
Returns the 'all' member.- Specified by:
 getAllMemberin interfaceHierarchy- Overrides:
 getAllMemberin classRolapHierarchy
 - 
setDefaultMember
Description copied from class:RolapHierarchySets default member of this Hierarchy.- Overrides:
 setDefaultMemberin classRolapHierarchy- Parameters:
 defaultMeasure- Default member
 - 
getCube
 
 -