org.teiid.query.function
Class FunctionDescriptor

java.lang.Object
  extended by org.teiid.query.function.FunctionDescriptor
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class FunctionDescriptor
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

The FunctionDescriptor describes a particular function instance enough to invoke the function.

See Also:
Serialized Form

Method Summary
 java.lang.Object clone()
           
 FunctionMethod.Determinism getDeterministic()
           
 java.lang.Object getMetadataID()
           
 FunctionMethod getMethod()
           
 java.lang.String getName()
           
 FunctionMethod.PushDown getPushdown()
           
 java.lang.Class<?> getReturnType()
           
 java.lang.String getSchema()
           
 java.lang.Class<?>[] getTypes()
           
static java.lang.Object importValue(java.lang.Object result, java.lang.Class<?> expectedType)
           
 java.lang.Object invokeFunction(java.lang.Object[] values)
          Invoke the function described in the function descriptor, using the values provided.
 boolean isNullDependent()
           
 boolean requiresContext()
           
 void setMetadataID(java.lang.Object metadataID)
           
 void setSchema(java.lang.String schema)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getSchema

public java.lang.String getSchema()

setSchema

public void setSchema(java.lang.String schema)

getName

public java.lang.String getName()

getPushdown

public FunctionMethod.PushDown getPushdown()

getTypes

public java.lang.Class<?>[] getTypes()

getReturnType

public java.lang.Class<?> getReturnType()

requiresContext

public boolean requiresContext()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isNullDependent

public boolean isNullDependent()

getDeterministic

public FunctionMethod.Determinism getDeterministic()

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getMethod

public FunctionMethod getMethod()

getMetadataID

public java.lang.Object getMetadataID()

setMetadataID

public void setMetadataID(java.lang.Object metadataID)

invokeFunction

public java.lang.Object invokeFunction(java.lang.Object[] values)
                                throws FunctionExecutionException
Invoke the function described in the function descriptor, using the values provided. Return the result of the function.

Parameters:
fd - Function descriptor describing the name and types of the arguments
values - Values that should match 1-to-1 with the types described in the function descriptor
Returns:
Result of invoking the function
Throws:
FunctionExecutionException

importValue

public static java.lang.Object importValue(java.lang.Object result,
                                           java.lang.Class<?> expectedType)
                                    throws java.lang.ArithmeticException,
                                           TransformationException
Throws:
java.lang.ArithmeticException
TransformationException


Copyright © 2011. All Rights Reserved.