|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UserDefinedFunction
Definition of a user-defined function.
The class must have a public, zero-arguments constructor, be on Mondrian's runtime class-path, and be referenced from the schema file:
<Schema>
....
<UserDefinedFunction name="MyFun" class="com.acme.MyFun">
</Schema>
Nested Class Summary | |
---|---|
static interface |
UserDefinedFunction.Argument
|
Method Summary | |
---|---|
Object |
execute(Evaluator evaluator,
UserDefinedFunction.Argument[] arguments)
Applies this function to a set of arguments, and returns a result. |
String |
getDescription()
Returns a description of the user-defined function. |
String |
getName()
Returns the name with which the user-defined function will be used from within MDX expressions. |
Type[] |
getParameterTypes()
Returns an array of the types of the parameters of this function. |
String[] |
getReservedWords()
Returns a list of reserved words used by this function. |
Type |
getReturnType(Type[] parameterTypes)
Returns the return-type of this function. |
Syntax |
getSyntax()
Returns the syntactic type of the user-defined function. |
Method Detail |
---|
String getName()
String getDescription()
Syntax getSyntax()
Syntax.Function
.
Type[] getParameterTypes()
Type getReturnType(Type[] parameterTypes)
parameterTypes
- Object execute(Evaluator evaluator, UserDefinedFunction.Argument[] arguments)
evaluator
- Evaluator containts the runtime context, in particular
the current member of each dimension.arguments
- Expressions which yield the arguments of this function.
Most user-defined functions will evaluate all arguments before using
them. Functions such as IIf
do not evaluate all
arguments; this technique is called lazy evaluation.
String[] getReservedWords()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |