Package mondrian.rolap
Class RolapTupleCalculation
- java.lang.Object
-
- mondrian.rolap.RolapTupleCalculation
-
- All Implemented Interfaces:
RolapCalculation
class RolapTupleCalculation extends Object implements RolapCalculation
Implementation ofRolapCalculationthat 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 booleancontainsAggregateFunction()Returns whether this calculation contains an aggregate function.booleanequals(Object obj)CalcgetCompiledExpression(RolapEvaluatorRoot root)Returns the compiled expression to evaluate the scalar value of the current cell.intgetHierarchyOrdinal()Returns the ordinal of this calculation; to resolve ties.intgetSolveOrder()Returns the solve order of this calculation.inthashCode()booleanisCalculatedInQuery()Returns whether this calculation is a member is computed from aWITH MEMBERclause in an MDX query.voidsetContextIn(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.StringtoString()
-
-
-
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:RolapCalculationPushes this calculated member or tuple onto the stack of evaluation contexts, and sets the context to the default member of the hierarchy.- Specified by:
setContextInin interfaceRolapCalculation- Parameters:
evaluator- Evaluator
-
getSolveOrder
public int getSolveOrder()
Description copied from interface:RolapCalculationReturns the solve order of this calculation. Identifies which order calculations are expanded.- Specified by:
getSolveOrderin interfaceRolapCalculation- Returns:
- Solve order
-
getHierarchyOrdinal
public int getHierarchyOrdinal()
Description copied from interface:RolapCalculationReturns the ordinal of this calculation; to resolve ties.- Specified by:
getHierarchyOrdinalin interfaceRolapCalculation- Returns:
- Ordinal or calculation
-
getCompiledExpression
public Calc getCompiledExpression(RolapEvaluatorRoot root)
Description copied from interface:RolapCalculationReturns 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:
getCompiledExpressionin interfaceRolapCalculation- Parameters:
root- Root evaluation context- Returns:
- Compiled scalar expression
-
containsAggregateFunction
public boolean containsAggregateFunction()
Description copied from interface:RolapCalculationReturns whether this calculation contains an aggregate function.- Specified by:
containsAggregateFunctionin interfaceRolapCalculation- Returns:
- Whether this calculation contains an aggregate function.
-
isCalculatedInQuery
public boolean isCalculatedInQuery()
Description copied from interface:RolapCalculationReturns whether this calculation is a member is computed from aWITH MEMBERclause in an MDX query.- Specified by:
isCalculatedInQueryin interfaceRolapCalculation- Returns:
- whether this calculation is computed in an MDX query
-
-