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
Modifier and TypeClassDescriptionstatic class
Substitute for a member in a hierarchy whose rollup policy is 'partial' or 'hidden'.protected static class
Calculated 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
Modifier and TypeFieldDescriptionprotected final RolapLevel
The level that the null member belongs too.protected MondrianDef.RelationOrJoin
protected MondrianDef.Hierarchy
Fields inherited from class mondrian.olap.HierarchyBase
allLevelName, allMemberName, description, dimension, hasAll, levels, name, subName, uniqueName
Fields inherited from class mondrian.olap.OlapElementBase
caption, visible
-
Method Summary
Modifier and TypeMethodDescriptionprotected int
Computes 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.boolean
Returns the 'all' member.Returns a list of annotations.Returns the default member of this hierarchy.protected org.apache.logging.log4j.Logger
Returns a special member representing the "null" value.int
Returns 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.boolean
isRagged()
A hierarchy is ragged if it contains one or more levels with hidden members.void
setDefaultMember
(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, lookupChild
Methods inherited from class mondrian.olap.OlapElementBase
clone, 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
-
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:
getLogger
in classOlapElementBase
-
getDisplayFolder
-
equals
- Overrides:
equals
in classOlapElementBase
-
computeHashCode
protected int computeHashCode()Description copied from class:OlapElementBase
Computes this object's hash code. Called at most once.- Overrides:
computeHashCode
in classOlapElementBase
- Returns:
- hash code
-
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.
-
getRolapSchema
-
getRelation
-
getXmlHierarchy
-
getDefaultMember
Description copied from interface:Hierarchy
Returns 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:Hierarchy
Returns a special member representing the "null" value. This never occurs on an axis, but may occur if functions such asLead
,NextMember
andParentMember
walk off the end of the hierarchy. -
getAllMember
Returns the 'all' member. -
createMember
Description copied from interface:Hierarchy
Creates a member of this hierarchy. If this is the measures hierarchy, a calculated member is created, andformula
must not be null. -
isRagged
public boolean isRagged()A hierarchy is ragged if it contains one or more levels with hidden members.- Specified by:
isRagged
in 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
-