Package org.teiid.query.function
Class FunctionDescriptor
- java.lang.Object
-
- org.teiid.query.function.FunctionDescriptor
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class FunctionDescriptor extends Object implements Serializable, Cloneable
The FunctionDescriptor describes a particular function instance enough to invoke the function.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FunctionDescriptor
clone()
FunctionMethod.Determinism
getDeterministic()
String
getFullName()
FunctionMethod
getMethod()
String
getName()
Procedure
getProcedure()
FunctionMethod.PushDown
getPushdown()
Class<?>
getReturnType()
String
getSchema()
Class<?>[]
getTypes()
static Object
importValue(Object result, Class<?> expectedType, CommandContext context)
Object
invokeFunction(Object[] values, CommandContext context, Object functionTarget)
Invoke the function described in the function descriptor, using the values provided.boolean
isCalledWithVarArgArrayParam()
boolean
isNullDependent()
boolean
isSystemFunction(String name)
Object
newInstance()
boolean
requiresContext()
void
setCalledWithVarArgArrayParam(boolean calledWithVarArgArrayParam)
void
setHasWrappedArgs(boolean hasWrappedArgs)
void
setProcedure(Procedure procedure)
void
setSchema(String schema)
String
toString()
-
-
-
Method Detail
-
newInstance
public Object newInstance() throws FunctionExecutionException
- Throws:
FunctionExecutionException
-
setHasWrappedArgs
public void setHasWrappedArgs(boolean hasWrappedArgs)
-
getSchema
public String getSchema()
-
setSchema
public void setSchema(String schema)
-
getName
public String getName()
-
getFullName
public String getFullName()
-
getPushdown
public FunctionMethod.PushDown getPushdown()
-
getTypes
public Class<?>[] getTypes()
-
getReturnType
public Class<?> getReturnType()
-
requiresContext
public boolean requiresContext()
-
getProcedure
public Procedure getProcedure()
-
setProcedure
public void setProcedure(Procedure procedure)
-
isNullDependent
public boolean isNullDependent()
-
getDeterministic
public FunctionMethod.Determinism getDeterministic()
-
clone
public FunctionDescriptor clone()
-
getMethod
public FunctionMethod getMethod()
-
invokeFunction
public Object invokeFunction(Object[] values, CommandContext context, Object functionTarget) throws FunctionExecutionException, BlockedException
Invoke the function described in the function descriptor, using the values provided. Return the result of the function.- Parameters:
values
- Values that should match 1-to-1 with the types described in the function descriptorcontext
-functionTarget
- the object to invoke the function on- Returns:
- Result of invoking the function
- Throws:
FunctionExecutionException
BlockedException
-
importValue
public static Object importValue(Object result, Class<?> expectedType, CommandContext context) throws ArithmeticException, TransformationException
-
isCalledWithVarArgArrayParam
public boolean isCalledWithVarArgArrayParam()
-
setCalledWithVarArgArrayParam
public void setCalledWithVarArgArrayParam(boolean calledWithVarArgArrayParam)
-
isSystemFunction
public boolean isSystemFunction(String name)
-
-