Class RolapCubeHierarchy

    • Field Detail

      • usingCubeFact

        protected final boolean usingCubeFact
        True if the hierarchy is degenerate - has no dimension table of its own, just drives from the cube's fact table.
    • Constructor Detail

      • RolapCubeHierarchy

        public RolapCubeHierarchy​(RolapCubeDimension cubeDimension,
                                  MondrianDef.CubeDimension cubeDim,
                                  RolapHierarchy rolapHierarchy,
                                  java.lang.String subName,
                                  int ordinal)
        Creates a RolapCubeHierarchy.
        Parameters:
        cubeDimension - Dimension
        cubeDim - XML dimension element
        rolapHierarchy - Wrapped hierarchy
        subName - Name of hierarchy within dimension
        ordinal - Ordinal of hierarchy within cube
    • Method Detail

      • getSharedHierarchyName

        public java.lang.String getSharedHierarchyName()
        Description copied from class: RolapHierarchy
        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]".

        Overrides:
        getSharedHierarchyName in class RolapHierarchy
      • getAllLevelName

        public java.lang.String getAllLevelName()
        Description copied from class: HierarchyBase
        Returns the name of the 'all' level in this hierarchy.
        Overrides:
        getAllLevelName in class HierarchyBase
        Returns:
        name of the 'all' level
      • isUsingCubeFact

        public boolean isUsingCubeFact()
      • lookupAlias

        public java.lang.String lookupAlias​(java.lang.String origTable)
      • getOrdinalInCube

        public final int getOrdinalInCube()
        Description copied from class: RolapHierarchy
        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.

        Overrides:
        getOrdinalInCube in class RolapHierarchy
        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 schema
        newrel - New star relation, generated by RolapStar, canonical, and shared between all cubes with similar structure
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class RolapHierarchy
      • computeHashCode

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

        public MondrianDef.RelationOrJoin getRelation()
        The currentRelation object is derived from the shared relation object it is generated via the RolapStar object, and contains unique aliases for it's particular join path
        Overrides:
        getRelation in class RolapHierarchy
        Returns:
        rolap cube hierarchy relation
      • 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.
        Specified by:
        getNullMember in interface Hierarchy
        Overrides:
        getNullMember in class RolapHierarchy
      • setDefaultMember

        public void setDefaultMember​(Member defaultMeasure)
        Description copied from class: RolapHierarchy
        Sets default member of this Hierarchy.
        Overrides:
        setDefaultMember in class RolapHierarchy
        Parameters:
        defaultMeasure - Default member
      • convertMemberName

        final java.lang.String convertMemberName​(java.lang.String memberUniqueName)
        Converts the unique name of a member of the underlying hierarchy to the appropriate name for this hierarchy.

        For example, if the shared hierarchy is [Time].[Quarterly] and the hierarchy usage is [Ship Time].[Quarterly], then [Time].[1997].[Q1] would be translated to [Ship Time].[Quarerly].[1997].[Q1].

        Parameters:
        memberUniqueName - Unique name of member from underlying hierarchy
        Returns:
        Translated unique name