Class RolapHierarchy

  • All Implemented Interfaces:
    Annotated, Hierarchy, OlapElement
    Direct Known Subclasses:
    RolapCubeHierarchy

    public class RolapHierarchy
    extends HierarchyBase
    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
    • Method Detail

      • computeHashCode

        protected int computeHashCode()
        Description copied from class: OlapElementBase
        Computes this object's hash code. Called at most once.
        Overrides:
        computeHashCode in class OlapElementBase
        Returns:
        hash code
      • getAnnotationMap

        public Map<String,​Annotation> 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.
      • getNullMember

        public Member 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 as Lead, NextMember and ParentMember walk 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: Hierarchy
        Creates a member of this hierarchy. If this is the measures hierarchy, a calculated member is created, and formula must 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 sharedHierarchyName holds 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 sharedHierarchyName will be "[Time].[Weekly]".

      • isRagged

        public boolean isRagged()
        A hierarchy is ragged if it contains one or more levels with hidden members.
        Specified by:
        isRagged in class HierarchyBase
      • 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