mondrian.rolap
Class RolapTupleCalculation

java.lang.Object
  extended by mondrian.rolap.RolapTupleCalculation
All Implemented Interfaces:
RolapCalculation

 class RolapTupleCalculation
extends 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
Version:
$Id: //open/mondrian/src/main/mondrian/rolap/RolapTupleCalculation.java#3 $
Author:
jhyde

Constructor Summary
RolapTupleCalculation(List<RolapHierarchy> hierarchyList, Calc calc)
          Creates a RolapTupleCalculation.
 
Method Summary
 boolean containsAggregateFunction()
          Returns whether this calculation contains an aggregate function.
 Calc getCompiledExpression(RolapEvaluatorRoot root)
          Returns the compiled expression to evaluate the scalar value of the current cell.
 int getHierarchyOrdinal()
          Returns the ordinal of this calculation; to resolve ties.
 int getSolveOrder()
          Returns the solve order of this calculation.
 boolean isCalculatedInQuery()
          Returns whether this calculation is a member is computed from a WITH MEMBER clause in an MDX query.
 RolapEvaluator pushSelf(RolapEvaluator evaluator)
          Pushes this calculated member or tuple onto the stack of evaluation contexts, sets the context to the default member of the hierarchy, and returns the evaluator containing the new context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RolapTupleCalculation

public RolapTupleCalculation(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

pushSelf

public RolapEvaluator pushSelf(RolapEvaluator evaluator)
Description copied from interface: RolapCalculation
Pushes this calculated member or tuple onto the stack of evaluation contexts, sets the context to the default member of the hierarchy, and returns the evaluator containing the new context.

Specified by:
pushSelf in interface RolapCalculation
Parameters:
evaluator - Current evaluator
Returns:
New 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

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads