Class RolapHierarchy.LimitedRollupMember

All Implemented Interfaces:
Comparable, Annotated, Member, OlapElement, RolapMember, RolapMemberInCube
Enclosing class:
RolapHierarchy

public static class RolapHierarchy.LimitedRollupMember extends RolapCubeMember
Substitute for a member in a hierarchy whose rollup policy is 'partial' or 'hidden'. The member is calculated using an expression which aggregates only visible descendants.

Note that this class extends RolapCubeMember only because other code expects that all members in a RolapCubeHierarchy are RolapCubeMembers. As part of Bug.BugSegregateRolapCubeMemberFixed, maybe make RolapCubeMember an interface.

See Also:
  • Field Details

  • Method Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class RolapCubeMember
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class RolapCubeMember
    • getExpression

      public Exp getExpression()
      Description copied from class: MemberBase
      Returns the expression by which this member is calculated. The expression is not null if and only if the member is not calculated.
      Specified by:
      getExpression in interface Member
      Overrides:
      getExpression in class RolapCubeMember
    • computeCalculated

      protected boolean computeCalculated(Member.MemberType memberType)
      Description copied from class: MemberBase
      Computes the value to be returned by MemberBase.isCalculated(), so it can be cached in a variable.
      Overrides:
      computeCalculated in class MemberBase
      Parameters:
      memberType - Member type
      Returns:
      Whether this member is calculated
    • isCalculated

      public boolean isCalculated()
      Description copied from interface: Member
      Returns whether this member is computed using either a with member clause in an mdx query or a calculated member defined in cube.
      Specified by:
      isCalculated in interface Member
      Overrides:
      isCalculated in class DelegatingRolapMember
    • isEvaluated

      public boolean isEvaluated()
      Description copied from interface: Member
      Returns whether this member should be evaluated within the Evaluator.

      Normally Member.isCalculated() and Member.isEvaluated() should return the same value, but in situations where mondrian would like to treat the two concepts separately such in role based security, these values may differ.

      Specified by:
      isEvaluated in interface Member
      Overrides:
      isEvaluated in class DelegatingRolapMember
      Returns:
      true if evaluated
    • setContextIn

      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

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

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

      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

      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

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