Class RolapTupleCalculation

  • All Implemented Interfaces:
    RolapCalculation

    class RolapTupleCalculation
    extends java.lang.Object
    implements RolapCalculation
    Implementation of RolapCalculation that changes one or more dimensions, then evaluates a given calculation.

    It is used to implement sets in slicers, in particular sets of tuples in the slicer.

    Since:
    May 15, 2009
    Author:
    jhyde
    • Constructor Detail

      • RolapTupleCalculation

        public RolapTupleCalculation​(java.util.List<RolapHierarchy> hierarchyList,
                                     Calc calc)
        Creates a RolapTupleCalculation.
        Parameters:
        hierarchyList - List of hierarchies to be replaced.
        calc - Compiled scalar expression to compute cell
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • setContextIn

        public void setContextIn​(RolapEvaluator evaluator)
        Description copied from interface: RolapCalculation
        Pushes this calculated member or tuple onto the stack of evaluation contexts, and sets the context to the default member of the hierarchy.
        Specified by:
        setContextIn in interface RolapCalculation
        Parameters:
        evaluator - Evaluator
      • getSolveOrder

        public int getSolveOrder()
        Description copied from interface: RolapCalculation
        Returns the solve order of this calculation. Identifies which order calculations are expanded.
        Specified by:
        getSolveOrder in interface RolapCalculation
        Returns:
        Solve order
      • getHierarchyOrdinal

        public int getHierarchyOrdinal()
        Description copied from interface: RolapCalculation
        Returns the ordinal of this calculation; to resolve ties.
        Specified by:
        getHierarchyOrdinal in interface RolapCalculation
        Returns:
        Ordinal or calculation
      • getCompiledExpression

        public Calc getCompiledExpression​(RolapEvaluatorRoot root)
        Description copied from interface: RolapCalculation
        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.
        Specified by:
        getCompiledExpression in interface RolapCalculation
        Parameters:
        root - Root evaluation context
        Returns:
        Compiled scalar expression
      • containsAggregateFunction

        public boolean containsAggregateFunction()
        Description copied from interface: RolapCalculation
        Returns whether this calculation contains an aggregate function.
        Specified by:
        containsAggregateFunction in interface RolapCalculation
        Returns:
        Whether this calculation contains an aggregate function.
      • isCalculatedInQuery

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