net.esper.eql.core
Interface MethodResolutionService

All Known Implementing Classes:
MethodResolutionServiceImpl

public interface MethodResolutionService

Service for resolving methods and aggregation functions, and for creating managing aggregation instances.


Method Summary
 AggregationMethod makeAvedevAggregator()
          Makes a new avedev-aggregator.
 AggregationMethod makeAvgAggregator()
          Makes a new avg-aggregator.
 AggregationMethod makeCountAggregator(boolean isIgnoreNull)
          Makes a new count-aggregator.
 AggregationMethod makeDistinctAggregator(AggregationMethod aggregationMethod, Class childType)
          Makes a new distinct-value-aggregator.
 AggregationMethod makeMedianAggregator()
          Makes a new median-aggregator.
 AggregationMethod makeMinMaxAggregator(MinMaxTypeEnum minMaxType, Class targetType)
          Makes a new min-max-aggregator.
 AggregationSupport makePlugInAggregator(String name)
          Makes a new plug-in aggregation instance by name.
 AggregationMethod makeStddevAggregator()
          Makes a new stddev-aggregator.
 AggregationMethod makeSumAggregator(Class type)
          Makes a new sum-aggregator.
 AggregationMethod[] newAggregators(AggregationMethod[] prototypes, MultiKeyUntyped groupKey)
          Returns a new set of aggregators given an existing prototype-set of aggregators for a given group key.
 AggregationSupport resolveAggregation(String functionName)
          Returns a plug-in aggregation method for a given configured aggregation function name.
 Method resolveMethod(String classNameAlias, String methodName, Class[] paramTypes)
          Resolves a given class, method and list of parameter types to a static method.
 

Method Detail

resolveMethod

Method resolveMethod(String classNameAlias,
                     String methodName,
                     Class[] paramTypes)
                     throws EngineImportException
Resolves a given class, method and list of parameter types to a static method.

Parameters:
classNameAlias - 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

resolveAggregation

AggregationSupport resolveAggregation(String functionName)
                                      throws EngineImportUndefinedException,
                                             EngineImportException
Returns a plug-in aggregation method for a given configured aggregation function name.

Parameters:
functionName - is the aggregation function name
Returns:
aggregation-providing class
Throws:
EngineImportUndefinedException - is the function name cannot be found
EngineImportException - if there was an error resolving class information

makePlugInAggregator

AggregationSupport makePlugInAggregator(String name)
Makes a new plug-in aggregation instance by name.

Parameters:
name - is the plug-in aggregation function name
Returns:
new instance of plug-in aggregation method

makeCountAggregator

AggregationMethod makeCountAggregator(boolean isIgnoreNull)
Makes a new count-aggregator.

Parameters:
isIgnoreNull - is true to ignore nulls, or false to count nulls
Returns:
aggregator

makeSumAggregator

AggregationMethod makeSumAggregator(Class type)
Makes a new sum-aggregator.

Parameters:
type - is the type to be summed up, i.e. float, long etc.
Returns:
aggregator

makeDistinctAggregator

AggregationMethod makeDistinctAggregator(AggregationMethod aggregationMethod,
                                         Class childType)
Makes a new distinct-value-aggregator.

Parameters:
aggregationMethod - is the inner aggregation method
childType - is the return type of the inner expression to aggregate, if any
Returns:
aggregator

makeAvgAggregator

AggregationMethod makeAvgAggregator()
Makes a new avg-aggregator.

Returns:
aggregator

makeAvedevAggregator

AggregationMethod makeAvedevAggregator()
Makes a new avedev-aggregator.

Returns:
aggregator

makeMedianAggregator

AggregationMethod makeMedianAggregator()
Makes a new median-aggregator.

Returns:
aggregator

makeMinMaxAggregator

AggregationMethod makeMinMaxAggregator(MinMaxTypeEnum minMaxType,
                                       Class targetType)
Makes a new min-max-aggregator.

Parameters:
minMaxType - dedicates whether to do min or max
targetType - is the type to max or min
Returns:
aggregator

makeStddevAggregator

AggregationMethod makeStddevAggregator()
Makes a new stddev-aggregator.

Returns:
aggregator

newAggregators

AggregationMethod[] newAggregators(AggregationMethod[] prototypes,
                                   MultiKeyUntyped groupKey)
Returns a new set of aggregators given an existing prototype-set of aggregators for a given group key.

Parameters:
prototypes - is the prototypes
groupKey - is the key to group-by for
Returns:
new set of aggregators for this group