|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mondrian.olap.fun.ResultStyleCompiler.MultiCalc
static class ResultStyleCompiler.MultiCalc
Calc with three child Calcs, one for ITERABLE, LIST and MUTABLE_LIST, which are evaluated during the normal evaluation process.
Field Summary | |
---|---|
(package private) Calc |
calcIter
|
(package private) Calc |
calcList
|
(package private) Calc |
calcMList
|
(package private) int |
cnt
|
(package private) static int |
counter
|
(package private) int |
lineNumber
|
(package private) boolean |
onlyMutableList
|
Constructor Summary | |
---|---|
ResultStyleCompiler.MultiCalc(Calc calcIter,
Calc calcList,
Calc calcMList,
boolean onlyMutableList)
|
Method Summary | ||
---|---|---|
void |
accept(CalcWriter calcWriter)
Prints this expression, by accepting a visiting CalcWriter . |
|
protected boolean |
compare(Object v1,
Object v2)
|
|
boolean |
dependsOn(Hierarchy hierarchy)
Returns whether this expression depends upon a given hierarchy. |
|
Object |
evaluate(Evaluator evaluator)
Evaluates this expression. |
|
protected boolean |
finalEval()
Returns whether this is a final evaluation; the one that takes place after the while-loop in the RolapResult constructor. |
|
ResultStyle |
getResultStyle()
Returns style in which the result of evaluating this expression is returned. |
|
Type |
getType()
Returns the type of this expression. |
|
boolean |
isWrapperFor(Class<?> iface)
|
|
protected void |
print(Member[] ma)
|
|
|
unwrap(Class<T> iface)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static int counter
final Calc calcIter
final Calc calcList
final Calc calcMList
final boolean onlyMutableList
int lineNumber
int cnt
Constructor Detail |
---|
ResultStyleCompiler.MultiCalc(Calc calcIter, Calc calcList, Calc calcMList, boolean onlyMutableList)
Method Detail |
---|
public boolean isWrapperFor(Class<?> iface)
isWrapperFor
in interface Calc
public <T> T unwrap(Class<T> iface)
unwrap
in interface Calc
protected boolean finalEval()
public Object evaluate(Evaluator evaluator)
Calc
evaluate
in interface Calc
evaluator
- Provides dimensional context in which to evaluate
this expression
public boolean dependsOn(Hierarchy hierarchy)
Calc
If it does not depend on the hierarchy, then re-evaluating the expression with a different member of this context must produce the same answer.
Some examples:[Measures].[Unit Sales]
depends on all dimensions except [Measures]
.
([Measures].[Unit Sales],
[Time].[1997]) > 1000
depends on all hierarchies except [Measures] and [Time].
Filter([Store].[USA].Children,
[Measures].[Unit Sales] < 50)
depends upon all hierarchies except [Store] and [Measures].
How so? Normally the scalar expression would depend upon all hierarchies
except [Measures], but the Filter
function sets the [Store]
context before evaluating the scalar expression, so it is not inherited
from the surrounding context.
dependsOn
in interface Calc
hierarchy
- Hierarchy
public Type getType()
Calc
getType
in interface Calc
public void accept(CalcWriter calcWriter)
Calc
CalcWriter
.
accept
in interface Calc
calcWriter
- Writerpublic ResultStyle getResultStyle()
Calc
One application of this method is for the compiler to figure out whether the compiled expression is returning a mutable list. If a mutable list is required, the compiler can create a mutable copy.
getResultStyle
in interface Calc
ExpCompiler.compileList(mondrian.olap.Exp, boolean)
protected boolean compare(Object v1, Object v2)
protected void print(Member[] ma)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |