|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface UserDefinedFunction.Argument
Method Summary | |
---|---|
java.lang.Object |
evaluate(Evaluator evaluator)
Evaluates the argument. |
java.lang.Iterable |
evaluateIterable(Evaluator eval)
Evaluates the argument to an iterable over members or tuples. |
java.util.List |
evaluateList(Evaluator eval)
Evaluates the argument to a list of members or tuples. |
java.lang.Object |
evaluateScalar(Evaluator evaluator)
Evaluates the argument as a scalar expression. |
Type |
getType()
Returns the type of the argument. |
Method Detail |
---|
Type getType()
java.lang.Object evaluateScalar(Evaluator evaluator)
The effect is the same as
evaluate(mondrian.olap.Evaluator)
except if the argument
evaluates to a member or tuple. This method will set the context
to the member or tuple and evaluate the current measure, whereas
evaluate
would return the member or tuple.
The effect is similar to creating a calculated member in an MDX query:
WITH MEMBER [Measures].[Previous Period] AS
([Measures].[Unit Sales], [Time].[Time].PrevMember)
SELECT {[Measures].[Unit Sales],
[Measures].[Previous Period]} on 0,
[Time].[Time].Children on 1
FROM [Sales]
Note how [Measures].[Previous Period]
is defined as a
tuple, but evaluates to a number.
evaluator
- Evaluation context
java.lang.Object evaluate(Evaluator evaluator)
If the argument is a set of members or tuples, this method may
return either a List
or an Iterable
. It is not safe
to blindly cast to List
. For guaranteed type, call
evaluateList(mondrian.olap.Evaluator)
or
evaluateIterable(mondrian.olap.Evaluator)
.
evaluator
- Evaluation context
java.util.List evaluateList(Evaluator eval)
eval
- Evaluation context
java.lang.Iterable evaluateIterable(Evaluator eval)
eval
- Evaluation context
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |