Class RolapHierarchy
- All Implemented Interfaces:
Annotated,Hierarchy,OlapElement
- Direct Known Subclasses:
RolapCubeHierarchy
RolapHierarchy implements Hierarchy for a ROLAP database.
The ordinal of a hierarchy within a particular cube is found by calling getOrdinalInCube().
Ordinals are contiguous and zero-based. Zero is always the [Measures] dimension.
NOTE: It is only valid to call that method on the measures hierarchy, and on members of the
RolapCubeHierarchy subclass. When the measures hierarchy is of that class, we will move the method down.
- Since:
- 10 August, 2001
- Author:
- jhyde
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSubstitute for a member in a hierarchy whose rollup policy is 'partial' or 'hidden'.protected static classCalculated member which is also a measure (that is, a member of the [Measures] dimension).Nested classes/interfaces inherited from interface mondrian.olap.OlapElement
OlapElement.LocalizedProperty -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final RolapLevelThe level that the null member belongs too.protected MondrianDef.RelationOrJoinprotected MondrianDef.HierarchyFields inherited from class mondrian.olap.HierarchyBase
allLevelName, allMemberName, description, dimension, hasAll, levels, name, subName, uniqueNameFields inherited from class mondrian.olap.OlapElementBase
caption, visible -
Method Summary
Modifier and TypeMethodDescriptionprotected intComputes this object's hash code.static Map<String,Annotation> createAnnotationMap(MondrianDef.Annotations annotations) createMember(Member parent, Level level, String name, Formula formula) Creates a member of this hierarchy.booleanReturns the 'all' member.Returns a list of annotations.Returns the default member of this hierarchy.protected org.apache.logging.log4j.LoggerReturns a special member representing the "null" value.intReturns the ordinal of this hierarchy in its cube.Returns the name of the source hierarchy, if this hierarchy is shared, otherwise null.Gets "unique key level name" attribute of this Hierarchy, if set.booleanisRagged()A hierarchy is ragged if it contains one or more levels with hidden members.voidsetDefaultMember(Member defaultMember) Sets default member of this Hierarchy.Methods inherited from class mondrian.olap.HierarchyBase
equals, getAllLevelName, getAllMemberName, getDescription, getDimension, getHierarchy, getLevels, 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
-
xmlHierarchy
-
relation
-
nullLevel
The level that the null member belongs too.
-
-
Method Details
-
createAnnotationMap
-
getLogger
protected org.apache.logging.log4j.Logger getLogger()- Specified by:
getLoggerin classOlapElementBase
-
getDisplayFolder
-
equals
- Overrides:
equalsin classOlapElementBase
-
computeHashCode
protected int computeHashCode()Description copied from class:OlapElementBaseComputes this object's hash code. Called at most once.- Overrides:
computeHashCodein classOlapElementBase- Returns:
- hash code
-
getAnnotationMap
Description copied from interface:AnnotatedReturns a list of annotations.The map may be empty, never null.
- Returns:
- Map from annotation name to annotations.
-
getRolapSchema
-
getRelation
-
getXmlHierarchy
-
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). -
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. -
getAllMember
Returns the 'all' member. -
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. -
isRagged
public boolean isRagged()A hierarchy is ragged if it contains one or more levels with hidden members.- Specified by:
isRaggedin classHierarchyBase
-
setDefaultMember
Sets default member of this Hierarchy.- Parameters:
defaultMember- Default member
-
getUniqueKeyLevelName
Gets "unique key level name" attribute of this Hierarchy, if set. If set, this property indicates that all level properties are functionally dependent (invariant) on their associated levels, and that the set of levels from the root to the named level (inclusive) effectively defines an alternate key.
This allows the GROUP BY to be eliminated from associated queries.
- Returns:
- the name of the "unique key" level, or null if not specified
-
getOrdinalInCube
public int getOrdinalInCube()Returns 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.
- Returns:
- Ordinal of this hierarchy in its cube
-