Class RolapCubeMember

    • Constructor Detail

      • RolapCubeMember

        public RolapCubeMember​(RolapCubeMember parent,
                               RolapMember member,
                               RolapCubeLevel cubeLevel)
        Creates a RolapCubeMember.
        Parameters:
        parent - Parent member
        member - Member of underlying (non-cube) hierarchy
        cubeLevel - Level
    • Method Detail

      • getRolapMember

        public final RolapMember getRolapMember()
        Returns the underlying member. This is a member of a shared dimension and does not belong to a cube.
        Returns:
        Underlying member
      • getCube

        public final RolapCube getCube()
        Description copied from interface: RolapMemberInCube
        Returns the cube this cube member belongs to.

        This method is not in the RolapMember interface, because regular members may be shared, and therefore do not belong to a specific cube.

        Specified by:
        getCube in interface RolapMemberInCube
        Returns:
        Cube this cube member belongs to, never null
      • getDataMember

        public final RolapCubeMember getDataMember()
        Description copied from interface: Member
        Returns the system-generated data member that is associated with a nonleaf member of a dimension.

        Returns this member if this member is a leaf member, or if the nonleaf member does not have an associated data member.

        Specified by:
        getDataMember in interface Member
        Overrides:
        getDataMember in class DelegatingRolapMember
      • getDimension

        public final RolapCubeDimension getDimension()
        Description copied from interface: OlapElement
        Returns the dimension of a this expression, or null if no dimension is defined. Applicable only to set expressions.

        Example 1:

         [Sales].children
         
        has dimension [Sales].

        Example 2:

         order(except([Promotion Media].[Media Type].members,
                      {[Promotion Media].[Media Type].[No Media]}),
               [Measures].[Unit Sales], DESC)
         
        has dimension [Promotion Media].

        Example 3:

         CrossJoin([Product].[Product Department].members,
                   [Gender].members)
         
        has no dimension (well, actually it is [Product] x [Gender], but we can't represent that, so we return null);

        Specified by:
        getDimension in interface OlapElement
        Overrides:
        getDimension in class DelegatingRolapMember
      • getLevel

        public final RolapCubeLevel getLevel()

        This method is central to how RolapCubeMember works. It allows a member from the cache to be used within different usages of the same shared dimension. The cache member is the same, but the RolapCubeMembers wrapping the cache member report that they belong to different levels, and hence different hierarchies, dimensions, and cubes.

        Specified by:
        getLevel in interface Member
        Specified by:
        getLevel in interface RolapMember
        Overrides:
        getLevel in class DelegatingRolapMember
      • setContextIn

        public abstract void setContextIn​(RolapEvaluator evaluator)
        Pushes this calculated member or tuple onto the stack of evaluation contexts, and sets the context to the default member of the hierarchy.
        Parameters:
        evaluator - Evaluator
      • getSolveOrder

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

        public abstract int getHierarchyOrdinal()
        Returns the ordinal of this calculation; to resolve ties.
        Returns:
        Ordinal or calculation
      • isCalculatedInQuery

        public abstract boolean isCalculatedInQuery()
        Returns whether this calculation is a member is computed from a WITH MEMBER clause in an MDX query.
        Returns:
        whether this calculation is computed in an MDX query
      • getCompiledExpression

        public abstract Calc getCompiledExpression​(mondrian.rolap.RolapEvaluatorRoot root)
        Returns the compiled expression to evaluate the scalar value of the current cell. This method will be called frequently, so the implementation should probably compile once and cache the result.
        Parameters:
        root - Root evaluation context
        Returns:
        Compiled scalar expression
      • containsAggregateFunction

        public abstract boolean containsAggregateFunction()
        Returns whether this calculation contains an aggregate function.
        Returns:
        Whether this calculation contains an aggregate function.