Package mondrian.rolap
Class RolapTupleCalculation
- java.lang.Object
-
- mondrian.rolap.RolapTupleCalculation
-
- All Implemented Interfaces:
RolapCalculation
class RolapTupleCalculation extends Object implements RolapCalculation
Implementation ofRolapCalculation
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 Summary
Constructors Constructor Description RolapTupleCalculation(List<RolapHierarchy> hierarchyList, Calc calc)
Creates a RolapTupleCalculation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsAggregateFunction()
Returns whether this calculation contains an aggregate function.boolean
equals(Object obj)
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.int
hashCode()
boolean
isCalculatedInQuery()
Returns whether this calculation is a member is computed from aWITH MEMBER
clause in an MDX query.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.String
toString()
-
-
-
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
-
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 interfaceRolapCalculation
- 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 interfaceRolapCalculation
- 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 interfaceRolapCalculation
- 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 interfaceRolapCalculation
- 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 interfaceRolapCalculation
- 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 aWITH MEMBER
clause in an MDX query.- Specified by:
isCalculatedInQuery
in interfaceRolapCalculation
- Returns:
- whether this calculation is computed in an MDX query
-
-