Package mondrian.udf
Class CurrentDateStringUdf
- java.lang.Object
-
- mondrian.udf.CurrentDateStringUdf
-
- All Implemented Interfaces:
UserDefinedFunction
public class CurrentDateStringUdf extends Object implements UserDefinedFunction
User-defined functionCurrentDateString, which returns the current date value as a formatted string, based on a format string passed in as a parameter. The format string conforms to the format string implemented byFormat.- Author:
- Zelaine Fong
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface mondrian.spi.UserDefinedFunction
UserDefinedFunction.Argument
-
-
Constructor Summary
Constructors Constructor Description CurrentDateStringUdf()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectexecute(Evaluator evaluator, UserDefinedFunction.Argument[] arguments)Applies this function to a set of arguments, and returns a result.StringgetDescription()Returns a description of the user-defined function.StringgetName()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.TypegetReturnType(Type[] parameterTypes)Returns the return-type of this function.SyntaxgetSyntax()Returns the syntactic type of the user-defined function.
-
-
-
Method Detail
-
execute
public Object execute(Evaluator evaluator, UserDefinedFunction.Argument[] arguments)
Description copied from interface:UserDefinedFunctionApplies this function to a set of arguments, and returns a result.- Specified by:
executein interfaceUserDefinedFunction- Parameters:
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 asIIfdo not evaluate all arguments; this technique is called lazy evaluation.- Returns:
- The result value.
-
getDescription
public String getDescription()
Description copied from interface:UserDefinedFunctionReturns a description of the user-defined function.- Specified by:
getDescriptionin interfaceUserDefinedFunction
-
getName
public String getName()
Description copied from interface:UserDefinedFunctionReturns the name with which the user-defined function will be used from within MDX expressions.- Specified by:
getNamein interfaceUserDefinedFunction
-
getParameterTypes
public Type[] getParameterTypes()
Description copied from interface:UserDefinedFunctionReturns an array of the types of the parameters of this function.- Specified by:
getParameterTypesin interfaceUserDefinedFunction
-
getReservedWords
public String[] getReservedWords()
Description copied from interface:UserDefinedFunctionReturns 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:
getReservedWordsin interfaceUserDefinedFunction
-
getReturnType
public Type getReturnType(Type[] parameterTypes)
Description copied from interface:UserDefinedFunctionReturns the return-type of this function.- Specified by:
getReturnTypein interfaceUserDefinedFunction- Parameters:
parameterTypes- Parameter types- Returns:
- Return type
-
getSyntax
public Syntax getSyntax()
Description copied from interface:UserDefinedFunctionReturns the syntactic type of the user-defined function. UsuallySyntax.Function.- Specified by:
getSyntaxin interfaceUserDefinedFunction
-
-