com.espertech.esper.epl.core
Interface EngineImportService

All Known Implementing Classes:
EngineImportServiceImpl

public interface EngineImportService

Service for engine-level resolution of static methods and aggregation methods.


Field Summary
static java.lang.String EXT_SINGLEROW_FUNCTION_TRANSPOSE
           
 
Method Summary
 void addAggregation(java.lang.String functionName, ConfigurationPlugInAggregationFunction aggregationDesc)
          Add an aggregation function.
 void addAggregationMultiFunction(ConfigurationPlugInAggregationMultiFunction desc)
           
 void addImport(java.lang.String importName)
          Add an import, such as "com.mypackage.*" or "com.mypackage.MyClass".
 void addSingleRow(java.lang.String functionName, java.lang.String singleRowFuncClass, java.lang.String methodName, ConfigurationPlugInSingleRowFunction.ValueCache valueCache, ConfigurationPlugInSingleRowFunction.FilterOptimizable filterOptimizable, boolean rethrowExceptions)
          Add an single-row function.
 ConfigurationMethodRef getConfigurationMethodRef(java.lang.String className)
          Returns the method invocation caches for the from-clause for a class.
 java.math.MathContext getDefaultMathContext()
           
 boolean isDuckType()
           
 boolean isSortUsingCollator()
           
 boolean isUdfCache()
           
 ExprNode resolveAggExtendedBuiltin(java.lang.String name, boolean isDistinct)
          Resolve an extended (non-SQL std) builtin aggregation.
 AggregationFunctionFactory resolveAggregationFactory(java.lang.String functionName)
          Used at statement compile-time to try and resolve a given function name into an aggregation method.
 ConfigurationPlugInAggregationMultiFunction resolveAggregationMultiFunction(java.lang.String name)
           
 java.lang.Class resolveAnnotation(java.lang.String className)
          Resolves a given class name, either fully qualified and simple and imported to a annotation.
 java.lang.Class resolveClass(java.lang.String className)
          Resolves a given class name, either fully qualified and simple and imported to a class.
 java.lang.reflect.Constructor resolveCtor(java.lang.Class clazz, java.lang.Class[] paramTypes)
          Resolves a constructor matching list of parameter types.
 java.lang.reflect.Method resolveMethod(java.lang.Class clazz, java.lang.String methodName, java.lang.Class[] paramTypes, boolean[] allowEventBeanType, boolean[] allowEventBeanCollType)
          Resolves a given method name and list of parameter types to an instance or static method exposed by the given class.
 java.lang.reflect.Method resolveMethod(java.lang.String className, java.lang.String methodName)
          Resolves a given class and method name to a static method, expecting the method to exist exactly once and not be overloaded, with any parameters.
 java.lang.reflect.Method resolveMethod(java.lang.String className, java.lang.String methodName, java.lang.Class[] paramTypes, boolean[] allowEventBeanType, boolean[] allowEventBeanCollType)
          Resolves a given class, method and list of parameter types to a static method.
 java.lang.reflect.Method resolveNonStaticMethod(java.lang.Class clazz, java.lang.String methodName)
          Resolves a given class and method name to a non-static method, expecting the method to exist exactly once and not be overloaded, with any parameters.
 Pair<java.lang.Class,EngineImportSingleRowDesc> resolveSingleRow(java.lang.String functionName)
          Used at statement compile-time to try and resolve a given function name into an single-row function.
 ExprNode resolveSingleRowExtendedBuiltin(java.lang.String name)
          Resolve an extended (non-SQL std) single-row function.
 

Field Detail

EXT_SINGLEROW_FUNCTION_TRANSPOSE

static final java.lang.String EXT_SINGLEROW_FUNCTION_TRANSPOSE
See Also:
Constant Field Values
Method Detail

getConfigurationMethodRef

ConfigurationMethodRef getConfigurationMethodRef(java.lang.String className)
Returns the method invocation caches for the from-clause for a class.

Parameters:
className - the class name providing the method
Returns:
cache configs

addImport

void addImport(java.lang.String importName)
               throws EngineImportException
Add an import, such as "com.mypackage.*" or "com.mypackage.MyClass".

Parameters:
importName - is the import to add
Throws:
EngineImportException - if the information or format is invalid

addAggregation

void addAggregation(java.lang.String functionName,
                    ConfigurationPlugInAggregationFunction aggregationDesc)
                    throws EngineImportException
Add an aggregation function.

Parameters:
functionName - is the name of the function to make known.
aggregationDesc - is the descriptor for the aggregation function
Throws:
EngineImportException - throw if format or information is invalid

addSingleRow

void addSingleRow(java.lang.String functionName,
                  java.lang.String singleRowFuncClass,
                  java.lang.String methodName,
                  ConfigurationPlugInSingleRowFunction.ValueCache valueCache,
                  ConfigurationPlugInSingleRowFunction.FilterOptimizable filterOptimizable,
                  boolean rethrowExceptions)
                  throws EngineImportException
Add an single-row function.

Parameters:
functionName - is the name of the function to make known.
singleRowFuncClass - is the class that provides the single row function
methodName - is the name of the public static method provided by the class that provides the single row function
valueCache - setting to control value cache behavior which may cache a result value when constant parameters are passed
Throws:
EngineImportException - throw if format or information is invalid

resolveAggregationFactory

AggregationFunctionFactory resolveAggregationFactory(java.lang.String functionName)
                                                     throws EngineImportUndefinedException,
                                                            EngineImportException
Used at statement compile-time to try and resolve a given function name into an aggregation method. Matches function name case-neutral.

Parameters:
functionName - is the function name
Returns:
aggregation provider
Throws:
EngineImportUndefinedException - if the function is not a configured aggregation function
EngineImportException - if the aggregation providing class could not be loaded or doesn't match

resolveAggregationMultiFunction

ConfigurationPlugInAggregationMultiFunction resolveAggregationMultiFunction(java.lang.String name)

resolveSingleRow

Pair<java.lang.Class,EngineImportSingleRowDesc> resolveSingleRow(java.lang.String functionName)
                                                                 throws EngineImportUndefinedException,
                                                                        EngineImportException
Used at statement compile-time to try and resolve a given function name into an single-row function. Matches function name case-neutral.

Parameters:
functionName - is the function name
Returns:
class name and method name pair
Throws:
EngineImportUndefinedException - if the function is not a configured single-row function
EngineImportException - if the function providing class could not be loaded or doesn't match

resolveMethod

java.lang.reflect.Method resolveMethod(java.lang.String className,
                                       java.lang.String methodName,
                                       java.lang.Class[] paramTypes,
                                       boolean[] allowEventBeanType,
                                       boolean[] allowEventBeanCollType)
                                       throws EngineImportException
Resolves a given class, method and list of parameter types to a static method.

Parameters:
className - is the class name to use
methodName - is the method name
paramTypes - is parameter types match expression sub-nodes
Returns:
method this resolves to
Throws:
EngineImportException - if the method cannot be resolved to a visible static method

resolveCtor

java.lang.reflect.Constructor resolveCtor(java.lang.Class clazz,
                                          java.lang.Class[] paramTypes)
                                          throws EngineImportException
Resolves a constructor matching list of parameter types.

Parameters:
clazz - is the class to use
paramTypes - is parameter types match expression sub-nodes
Returns:
method this resolves to
Throws:
EngineImportException - if the ctor cannot be resolved

resolveClass

java.lang.Class resolveClass(java.lang.String className)
                             throws EngineImportException
Resolves a given class name, either fully qualified and simple and imported to a class.

Parameters:
className - is the class name to use
Returns:
class this resolves to
Throws:
EngineImportException - if there was an error resolving the class

resolveAnnotation

java.lang.Class resolveAnnotation(java.lang.String className)
                                  throws EngineImportException
Resolves a given class name, either fully qualified and simple and imported to a annotation.

Parameters:
className - is the class name to use
Returns:
annotation class this resolves to
Throws:
EngineImportException - if there was an error resolving the class

resolveMethod

java.lang.reflect.Method resolveMethod(java.lang.String className,
                                       java.lang.String methodName)
                                       throws EngineImportException
Resolves a given class and method name to a static method, expecting the method to exist exactly once and not be overloaded, with any parameters.

Parameters:
className - is the class name to use
methodName - is the method name
Returns:
method this resolves to
Throws:
EngineImportException - if the method cannot be resolved to a visible static method, or if the method is overloaded

resolveNonStaticMethod

java.lang.reflect.Method resolveNonStaticMethod(java.lang.Class clazz,
                                                java.lang.String methodName)
                                                throws EngineImportException
Resolves a given class and method name to a non-static method, expecting the method to exist exactly once and not be overloaded, with any parameters.

Parameters:
clazz - is the class
methodName - is the method name
Returns:
method this resolves to
Throws:
EngineImportException - if the method cannot be resolved to a visible static method, or if the method is overloaded

resolveMethod

java.lang.reflect.Method resolveMethod(java.lang.Class clazz,
                                       java.lang.String methodName,
                                       java.lang.Class[] paramTypes,
                                       boolean[] allowEventBeanType,
                                       boolean[] allowEventBeanCollType)
                                       throws EngineImportException
Resolves a given method name and list of parameter types to an instance or static method exposed by the given class.

Parameters:
clazz - is the class to look for a fitting method
methodName - is the method name
paramTypes - is parameter types match expression sub-nodes
allowEventBeanType - whether EventBean footprint is allowed
Returns:
method this resolves to
Throws:
EngineImportException - if the method cannot be resolved to a visible static or instance method

resolveAggExtendedBuiltin

ExprNode resolveAggExtendedBuiltin(java.lang.String name,
                                   boolean isDistinct)
Resolve an extended (non-SQL std) builtin aggregation.

Parameters:
name - of func
isDistinct - indicator
Returns:
aggregation func node

resolveSingleRowExtendedBuiltin

ExprNode resolveSingleRowExtendedBuiltin(java.lang.String name)
Resolve an extended (non-SQL std) single-row function.

Parameters:
name - of func
Returns:
node or null

isDuckType

boolean isDuckType()

isUdfCache

boolean isUdfCache()

isSortUsingCollator

boolean isSortUsingCollator()

addAggregationMultiFunction

void addAggregationMultiFunction(ConfigurationPlugInAggregationMultiFunction desc)
                                 throws EngineImportException
Throws:
EngineImportException

getDefaultMathContext

java.math.MathContext getDefaultMathContext()

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com