Package mondrian.olap.fun
Class NativizeSetFunDef.NonNativeCalc
- java.lang.Object
-
- mondrian.olap.fun.NativizeSetFunDef.NonNativeCalc
-
- All Implemented Interfaces:
Calc
- Direct Known Subclasses:
NativizeSetFunDef.NonNativeIterCalc,NativizeSetFunDef.NonNativeListCalc
- Enclosing class:
- NativizeSetFunDef
static class NativizeSetFunDef.NonNativeCalc extends Object implements Calc
-
-
Field Summary
Fields Modifier and Type Field Description (package private) booleannativeEnabled(package private) Calcparent
-
Constructor Summary
Constructors Modifier Constructor Description protectedNonNativeCalc(Calc parent, boolean nativeEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(CalcWriter calcWriter)Prints this expression, by accepting a visitingCalcWriter.booleandependsOn(Hierarchy hierarchy)Returns whether this expression depends upon a given hierarchy.Objectevaluate(Evaluator evaluator)Evaluates this expression.ResultStylegetResultStyle()Returns style in which the result of evaluating this expression is returned.TypegetType()Returns the type of this expression.booleanisWrapperFor(Class<?> iface)Default implementation just does 'instanceof TargetClass'.<T> Tunwrap(Class<T> iface)Default implementation just casts to TargetClass.
-
-
-
Field Detail
-
parent
final Calc parent
-
nativeEnabled
final boolean nativeEnabled
-
-
Constructor Detail
-
NonNativeCalc
protected NonNativeCalc(Calc parent, boolean nativeEnabled)
-
-
Method Detail
-
evaluate
public Object evaluate(Evaluator evaluator)
Description copied from interface:CalcEvaluates this expression.
-
dependsOn
public boolean dependsOn(Hierarchy hierarchy)
Description copied from interface:CalcReturns whether this expression depends upon a given hierarchy.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:- The expression
depends on all dimensions except[Measures].[Unit Sales][Measures]. - The boolean expression
depends on all hierarchies except [Measures] and [Time].([Measures].[Unit Sales], [Time].[1997]) > 1000 - The list expression
depends upon all hierarchies except [Store] and [Measures]. How so? Normally the scalar expression would depend upon all hierarchies except [Measures], but theFilter([Store].[USA].Children, [Measures].[Unit Sales] < 50)Filterfunction sets the [Store] context before evaluating the scalar expression, so it is not inherited from the surrounding context.
- The expression
-
getType
public Type getType()
Description copied from interface:CalcReturns the type of this expression.
-
accept
public void accept(CalcWriter calcWriter)
Description copied from interface:CalcPrints this expression, by accepting a visitingCalcWriter.
-
getResultStyle
public ResultStyle getResultStyle()
Description copied from interface:CalcReturns style in which the result of evaluating this expression is returned.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.
- Specified by:
getResultStylein interfaceCalc- See Also:
ExpCompiler.compileList(mondrian.olap.Exp, boolean)
-
isWrapperFor
public boolean isWrapperFor(Class<?> iface)
Default implementation just does 'instanceof TargetClass'. Subtypes that are wrappers should override.- Specified by:
isWrapperForin interfaceCalc
-
-