public class EngineImportServiceImpl extends java.lang.Object implements EngineImportService
EXT_SINGLEROW_FUNCTION_TRANSPOSE
Constructor and Description |
---|
EngineImportServiceImpl(boolean allowExtendedAggregationFunc,
boolean isUdfCache,
boolean isDuckType,
boolean sortUsingCollator,
java.math.MathContext optionalDefaultMathContext)
Ctor
|
Modifier and Type | Method and Description |
---|---|
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 |
addMethodRefs(java.util.Map<java.lang.String,ConfigurationMethodRef> configs)
Adds cache configs for method invocations for from-clause.
|
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 name)
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.
|
Pair<java.lang.Class,EngineImportSingleRowDesc> |
resolveSingleRow(java.lang.String name)
Used at statement compile-time to try and resolve a given function name into an
single-row function.
|
public EngineImportServiceImpl(boolean allowExtendedAggregationFunc, boolean isUdfCache, boolean isDuckType, boolean sortUsingCollator, java.math.MathContext optionalDefaultMathContext)
allowExtendedAggregationFunc
- true to allow non-SQL standard builtin agg functions.public boolean isUdfCache()
isUdfCache
in interface EngineImportService
public boolean isDuckType()
isDuckType
in interface EngineImportService
public ConfigurationMethodRef getConfigurationMethodRef(java.lang.String className)
EngineImportService
getConfigurationMethodRef
in interface EngineImportService
className
- the class name providing the methodpublic void addMethodRefs(java.util.Map<java.lang.String,ConfigurationMethodRef> configs)
configs
- cache configspublic void addImport(java.lang.String importName) throws EngineImportException
EngineImportService
addImport
in interface EngineImportService
importName
- is the import to addEngineImportException
- if the information or format is invalidpublic void addAggregation(java.lang.String functionName, ConfigurationPlugInAggregationFunction aggregationDesc) throws EngineImportException
EngineImportService
addAggregation
in interface EngineImportService
functionName
- is the name of the function to make known.aggregationDesc
- is the descriptor for the aggregation functionEngineImportException
- throw if format or information is invalidpublic void addSingleRow(java.lang.String functionName, java.lang.String singleRowFuncClass, java.lang.String methodName, ConfigurationPlugInSingleRowFunction.ValueCache valueCache, ConfigurationPlugInSingleRowFunction.FilterOptimizable filterOptimizable, boolean rethrowExceptions) throws EngineImportException
EngineImportService
addSingleRow
in interface EngineImportService
functionName
- is the name of the function to make known.singleRowFuncClass
- is the class that provides the single row functionmethodName
- is the name of the public static method provided by the class that provides the single row functionvalueCache
- setting to control value cache behavior which may cache a result value when constant parameters are passedEngineImportException
- throw if format or information is invalidpublic AggregationFunctionFactory resolveAggregationFactory(java.lang.String name) throws EngineImportUndefinedException, EngineImportException
EngineImportService
resolveAggregationFactory
in interface EngineImportService
name
- is the function nameEngineImportUndefinedException
- if the function is not a configured aggregation functionEngineImportException
- if the aggregation providing class could not be loaded or doesn't matchpublic void addAggregationMultiFunction(ConfigurationPlugInAggregationMultiFunction desc) throws EngineImportException
addAggregationMultiFunction
in interface EngineImportService
EngineImportException
public ConfigurationPlugInAggregationMultiFunction resolveAggregationMultiFunction(java.lang.String name)
resolveAggregationMultiFunction
in interface EngineImportService
public Pair<java.lang.Class,EngineImportSingleRowDesc> resolveSingleRow(java.lang.String name) throws EngineImportException, EngineImportUndefinedException
EngineImportService
resolveSingleRow
in interface EngineImportService
name
- is the function nameEngineImportException
- if the function providing class could not be loaded or doesn't matchEngineImportUndefinedException
- if the function is not a configured single-row functionpublic java.lang.reflect.Method resolveMethod(java.lang.String className, java.lang.String methodName, java.lang.Class[] paramTypes, boolean[] allowEventBeanType, boolean[] allowEventBeanCollType) throws EngineImportException
EngineImportService
resolveMethod
in interface EngineImportService
className
- is the class name to usemethodName
- is the method nameparamTypes
- is parameter types match expression sub-nodesEngineImportException
- if the method cannot be resolved to a visible static methodpublic java.lang.reflect.Constructor resolveCtor(java.lang.Class clazz, java.lang.Class[] paramTypes) throws EngineImportException
EngineImportService
resolveCtor
in interface EngineImportService
clazz
- is the class to useparamTypes
- is parameter types match expression sub-nodesEngineImportException
- if the ctor cannot be resolvedpublic java.lang.reflect.Method resolveMethod(java.lang.String className, java.lang.String methodName) throws EngineImportException
EngineImportService
resolveMethod
in interface EngineImportService
className
- is the class name to usemethodName
- is the method nameEngineImportException
- if the method cannot be resolved to a visible static method, or
if the method is overloadedpublic java.lang.Class resolveClass(java.lang.String className) throws EngineImportException
EngineImportService
resolveClass
in interface EngineImportService
className
- is the class name to useEngineImportException
- if there was an error resolving the classpublic java.lang.Class resolveAnnotation(java.lang.String className) throws EngineImportException
EngineImportService
resolveAnnotation
in interface EngineImportService
className
- is the class name to useEngineImportException
- if there was an error resolving the classpublic java.lang.reflect.Method resolveMethod(java.lang.Class clazz, java.lang.String methodName, java.lang.Class[] paramTypes, boolean[] allowEventBeanType, boolean[] allowEventBeanCollType) throws EngineImportException
EngineImportService
resolveMethod
in interface EngineImportService
clazz
- is the class to look for a fitting methodmethodName
- is the method nameparamTypes
- is parameter types match expression sub-nodesallowEventBeanType
- whether EventBean footprint is allowedEngineImportException
- if the method cannot be resolved to a visible static or instance methodpublic ExprNode resolveAggExtendedBuiltin(java.lang.String name, boolean isDistinct)
EngineImportService
resolveAggExtendedBuiltin
in interface EngineImportService
name
- of funcisDistinct
- indicatorpublic java.math.MathContext getDefaultMathContext()
getDefaultMathContext
in interface EngineImportService
public boolean isSortUsingCollator()
isSortUsingCollator
in interface EngineImportService