Class RolapMemberBase

    • Constructor Detail

      • RolapMemberBase

        protected RolapMemberBase​(RolapMember parentMember,
                                  RolapLevel level,
                                  Object key,
                                  String name,
                                  Member.MemberType memberType)
        Creates a RolapMemberBase.
        Parameters:
        parentMember - Parent member
        level - Level this member belongs to
        key - Key to this member in the underlying RDBMS
        name - Name of this member
        memberType - Type of member
      • RolapMemberBase

        protected RolapMemberBase()
    • Method Detail

      • getCaptionValue

        public Object getCaptionValue()
        An object value to be formatted further by member formatter. Actually, acts like MemberBase#getCaption(), but using not formatted object values.
      • setCaptionValue

        public void setCaptionValue​(Object captionValue)
      • getAnnotationMap

        public Map<String,​Annotation> getAnnotationMap()
        Description copied from interface: Annotated
        Returns a list of annotations.

        The map may be empty, never null.

        Specified by:
        getAnnotationMap in interface Annotated
        Returns:
        Map from annotation name to annotations.
      • setUniqueName

        protected void setUniqueName​(Object key)
      • isCalculatedInQuery

        public boolean isCalculatedInQuery()
        Description copied from interface: Member
        Returns whether this member is computed from a WITH MEMBER clause in an MDX query.
        Specified by:
        isCalculatedInQuery in interface Member
      • setName

        public void setName​(String name)
        Description copied from interface: Member
        Only allowable if the member is part of the WITH clause of a query.
        Specified by:
        setName in interface Member
      • setProperty

        public void setProperty​(String name,
                                Object value)
        Sets a property of this member to a given value.

        WARNING: Setting system properties such as "$name" may have nasty side-effects.

        Specified by:
        setProperty in interface Member
      • getPropertyValue

        public Object getPropertyValue​(String propertyName)
        Description copied from interface: Member
        Returns the value of the property named propertyName. Name match is case-sensitive.
        Specified by:
        getPropertyValue in interface Member
      • getPropertyValue

        public Object getPropertyValue​(String propertyName,
                                       boolean matchCase)
        Description copied from interface: Member
        Returns the value of the property named propertyName, matching according to the required case-sensitivity.
        Specified by:
        getPropertyValue in interface Member
      • getPropertyFromMap

        protected Object getPropertyFromMap​(String propertyName,
                                            boolean matchCase)
        Returns the value of a property by looking it up in the property map.
        Parameters:
        propertyName - Name of property
        matchCase - Whether to match name case-sensitive
        Returns:
        Property value
      • childLevelHasApproxRowCount

        protected boolean childLevelHasApproxRowCount()
      • getProperties

        public Property[] getProperties()
        Description copied from interface: Member
        Returns the definitions of the properties this member may have.
        Specified by:
        getProperties in interface Member
      • getOrdinal

        public int getOrdinal()
        Description copied from class: MemberBase
        Returns the ordinal of this member within its hierarchy. The default implementation returns -1.
        Specified by:
        getOrdinal in interface Member
        Overrides:
        getOrdinal in class MemberBase
      • setOrdinal

        protected void setOrdinal​(int ordinal,
                                  boolean forced)
      • isHidden

        public boolean isHidden()
        Description copied from interface: Member
        Returns whether this member is 'hidden', as per the rules which define a ragged hierarchy.
        Specified by:
        isHidden in interface Member
        Overrides:
        isHidden in class MemberBase
      • getDepth

        public int getDepth()
        Description copied from interface: Member
        returns the depth of this member, which is not the level's depth in case of parent child dimensions
        Specified by:
        getDepth in interface Member
        Returns:
        depth
      • getAllMembers

        public static List<List<Member>> getAllMembers​(SchemaReader schemaReader,
                                                       Hierarchy hierarchy)
        Returns a list of member lists where the first member list is the root members while the last member array is the leaf members.

        If you know that you will need to get all or most of the members of a hierarchy, then calling this which gets all of the hierarchy's members all at once is much faster than getting members one at a time.

        Parameters:
        schemaReader - Schema reader
        hierarchy - Hierarchy
        Returns:
        List of arrays of members
      • getHierarchyCardinality

        public static int getHierarchyCardinality​(SchemaReader schemaReader,
                                                  Hierarchy hierarchy)
      • setOrdinals

        public static void setOrdinals​(SchemaReader schemaReader,
                                       Member seedMember)
        Sets member ordinal values using a Bottom-up/Top-down algorithm.

        Gets an array of members for each level and traverses array for the lowest level, setting each member's parent's parent's etc. member's ordinal if not set working back down to the leaf member and then going to the next leaf member and traversing up again.

        The above algorithm only works for a hierarchy that has all of its leaf members in the same level (that is, a non-ragged hierarchy), which is the norm. After all member ordinal values have been set, traverses the array of members, making sure that all members' ordinals have been set. If one is found that is not set, then one must to a full Top-down setting of the ordinals.

        The Bottom-up/Top-down algorithm is MUCH faster than the Top-down algorithm.

        Parameters:
        schemaReader - Schema reader
        seedMember - Member
      • keyToString

        protected static String keyToString​(Object key)
        Converts a key to a string to be used as part of the member's name and unique name.

        Usually, it just calls Object.toString(). But if the key is an integer value represented in a floating-point column, we'd prefer the integer value. For example, one member of the [Sales].[Store SQFT] dimension comes out "20319.0" but we'd like it to be "20319".

      • containsAggregateFunction

        public boolean containsAggregateFunction()
      • getCompiledExpression

        public Calc getCompiledExpression​(mondrian.rolap.RolapEvaluatorRoot root)
      • getHierarchyOrdinal

        public int getHierarchyOrdinal()
      • setContextIn

        public void setContextIn​(RolapEvaluator evaluator)
      • getSolveOrder

        public abstract int getSolveOrder()
        Returns the solve order of this calculation. Identifies which order calculations are expanded.
        Returns:
        Solve order