Class RolapHierarchy
- java.lang.Object
-
- mondrian.olap.OlapElementBase
-
- mondrian.olap.HierarchyBase
-
- mondrian.rolap.RolapHierarchy
-
- All Implemented Interfaces:
Annotated,Hierarchy,OlapElement
- Direct Known Subclasses:
RolapCubeHierarchy
public class RolapHierarchy extends HierarchyBase
RolapHierarchyimplementsHierarchyfor 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
RolapCubeHierarchysubclass. When the measures hierarchy is of that class, we will move the method down.)- Since:
- 10 August, 2001
- Author:
- jhyde
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRolapHierarchy.LimitedRollupMemberSubstitute for a member in a hierarchy whose rollup policy is 'partial' or 'hidden'.protected classRolapHierarchy.RolapCalculatedMeasureCalculated 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
Fields Modifier and Type Field Description protected RolapLevelnullLevelThe level that the null member belongs too.protected MondrianDef.RelationOrJoinrelationprotected MondrianDef.HierarchyxmlHierarchy-
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intcomputeHashCode()Computes this object's hash code.static Map<String,Annotation>createAnnotationMap(MondrianDef.Annotations annotations)MembercreateMember(Member parent, Level level, String name, Formula formula)Creates a member of this hierarchy.booleanequals(Object o)RolapMembergetAllMember()Returns the 'all' member.Map<String,Annotation>getAnnotationMap()Returns a list of annotations.MembergetDefaultMember()Returns the default member of this hierarchy.protected org.apache.logging.log4j.LoggergetLogger()MembergetNullMember()Returns a special member representing the "null" value.intgetOrdinalInCube()Returns the ordinal of this hierarchy in its cube.MondrianDef.RelationOrJoingetRelation()RolapSchemagetRolapSchema()StringgetSharedHierarchyName()Returns the name of the source hierarchy, if this hierarchy is shared, otherwise null.StringgetUniqueKeyLevelName()Gets "unique key level name" attribute of this Hierarchy, if set.MondrianDef.HierarchygetXmlHierarchy()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, 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 Detail
-
xmlHierarchy
protected MondrianDef.Hierarchy xmlHierarchy
-
relation
protected MondrianDef.RelationOrJoin relation
-
nullLevel
protected final RolapLevel nullLevel
The level that the null member belongs too.
-
-
Method Detail
-
createAnnotationMap
public static Map<String,Annotation> createAnnotationMap(MondrianDef.Annotations annotations)
-
getLogger
protected org.apache.logging.log4j.Logger getLogger()
- Specified by:
getLoggerin classOlapElementBase
-
equals
public boolean equals(Object o)
- 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
public Map<String,Annotation> 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
public RolapSchema getRolapSchema()
-
getRelation
public MondrianDef.RelationOrJoin getRelation()
-
getXmlHierarchy
public MondrianDef.Hierarchy getXmlHierarchy()
-
getDefaultMember
public Member 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
public Member 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
public RolapMember getAllMember()
Returns the 'all' member.
-
createMember
public Member createMember(Member parent, Level level, String name, Formula formula)
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.
-
getSharedHierarchyName
public String getSharedHierarchyName()
Returns the name of the source hierarchy, if this hierarchy is shared, otherwise null.If this hierarchy is a public -- that is, it belongs to a dimension which is a usage of a shared dimension -- then
sharedHierarchyNameholds the unique name of the shared hierarchy; otherwise it is null.Suppose this hierarchy is "Weekly" in the dimension "Order Date" of cube "Sales", and that "Order Date" is a usage of the "Time" dimension. Then
sharedHierarchyNamewill be "[Time].[Weekly]".
-
isRagged
public boolean isRagged()
A hierarchy is ragged if it contains one or more levels with hidden members.- Specified by:
isRaggedin classHierarchyBase
-
setDefaultMember
public void setDefaultMember(Member defaultMember)
Sets default member of this Hierarchy.- Parameters:
defaultMember- Default member
-
getUniqueKeyLevelName
public String 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
-
-