mondrian.test
Class UdfTest.MemberNameFunction

java.lang.Object
  extended by mondrian.test.UdfTest.MemberNameFunction
All Implemented Interfaces:
UserDefinedFunction
Enclosing class:
UdfTest

public static class UdfTest.MemberNameFunction
extends Object
implements UserDefinedFunction

Function that takes a member and returns a name.


Nested Class Summary
 
Nested classes/interfaces inherited from interface mondrian.spi.UserDefinedFunction
UserDefinedFunction.Argument
 
Constructor Summary
UdfTest.MemberNameFunction()
           
 
Method Summary
 Object execute(Evaluator eval, UserDefinedFunction.Argument[] args)
          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[] arg0)
          Returns the return-type of this function.
 Syntax getSyntax()
          Returns the syntactic type of the user-defined function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UdfTest.MemberNameFunction

public UdfTest.MemberNameFunction()
Method Detail

execute

public Object execute(Evaluator eval,
                      UserDefinedFunction.Argument[] args)
Description copied from interface: UserDefinedFunction
Applies this function to a set of arguments, and returns a result.

Specified by:
execute in interface UserDefinedFunction
Parameters:
eval - Evaluator containts the runtime context, in particular the current member of each dimension.
args - 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.
Returns:
The result value.

getDescription

public String getDescription()
Description copied from interface: UserDefinedFunction
Returns a description of the user-defined function.

Specified by:
getDescription in interface UserDefinedFunction

getName

public String getName()
Description copied from interface: UserDefinedFunction
Returns the name with which the user-defined function will be used from within MDX expressions.

Specified by:
getName in interface UserDefinedFunction

getParameterTypes

public Type[] getParameterTypes()
Description copied from interface: UserDefinedFunction
Returns an array of the types of the parameters of this function.

Specified by:
getParameterTypes in interface UserDefinedFunction

getReservedWords

public String[] getReservedWords()
Description copied from interface: UserDefinedFunction
Returns a list of reserved words used by this function. May return an empty array or null if this function does not require any reserved words.

Specified by:
getReservedWords in interface UserDefinedFunction

getReturnType

public Type getReturnType(Type[] arg0)
Description copied from interface: UserDefinedFunction
Returns the return-type of this function.

Specified by:
getReturnType in interface UserDefinedFunction
Parameters:
arg0 - Parameter types
Returns:
Return type

getSyntax

public Syntax getSyntax()
Description copied from interface: UserDefinedFunction
Returns the syntactic type of the user-defined function. Usually Syntax.Function.

Specified by:
getSyntax in interface UserDefinedFunction

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads