mondrian.rolap
Interface RolapCalculation

All Known Implementing Classes:
RolapMemberCalculation, RolapTupleCalculation

interface RolapCalculation

Entry in the evaluation context that indicates a calculation that needs to be performed before we get to the atomic stored cells.

Most of the time it's just members that are calculated, but calculated tuples arise when the slicer is a set of tuples.

The evaluator uses this interface to efficiently expand a member or tuple from the evaluation context. When evaluated, a calculation will change one or more elements of the context (calculated members just change one, but tuple sets in the slicer can change more than one).

Since:
May 15, 2009
Version:
$Id: //open/mondrian/src/main/mondrian/rolap/RolapCalculation.java#3 $
Author:
jhyde

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.
 

Method Detail

pushSelf

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.

Parameters:
evaluator - Current evaluator
Returns:
New 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.


getCompiledExpression

Calc getCompiledExpression(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.

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