com.espertech.esper.epl.agg.service
Class AggregationValidationContext

java.lang.Object
  extended by com.espertech.esper.epl.agg.service.AggregationValidationContext

public class AggregationValidationContext
extends java.lang.Object

Context for use with plug-in custom aggregation functions that implement AggregationFunctionFactory.

This context object provides access to the parameter expressions themselves as well as information compiled from the parameter expressions for your convenience.


Constructor Summary
AggregationValidationContext(java.lang.Class[] parameterTypes, boolean[] constantValue, java.lang.Object[] constantValues, boolean distinct, boolean windowed, ExprNode[] expressions)
          Ctor.
 
Method Summary
 java.lang.Object[] getConstantValues()
          If a parameter expression returns a constant value, the value of the constant it returns is provided in this array.
 ExprNode[] getExpressions()
          Returns the parameter expressions themselves for interrogation.
 boolean[] getIsConstantValue()
          A boolean indicator for each parameter expression that is true if the expression returns a constant result or false if the expression result is not a constant value.
 java.lang.Class[] getParameterTypes()
          The return type of each parameter expression.
 boolean isDistinct()
          Returns true to indicate that the 'distinct' keyword was specified for this aggregation function.
 boolean isWindowed()
          Returns true to indicate that all parameter expressions return event properties that originate from a stream that provides a remove stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregationValidationContext

public AggregationValidationContext(java.lang.Class[] parameterTypes,
                                    boolean[] constantValue,
                                    java.lang.Object[] constantValues,
                                    boolean distinct,
                                    boolean windowed,
                                    ExprNode[] expressions)
Ctor.

Parameters:
parameterTypes - the type of each parameter expression.
constantValue - for each parameter expression an indicator whether the expression returns a constant result
constantValues - for each parameter expression that returns a constant result this array contains the constant value
distinct - true if 'distinct' keyword was provided
windowed - true if all event properties references by parameter expressions are from streams that have data windows declared onto the stream or are from named windows
expressions - the parameter expressions themselves
Method Detail

getParameterTypes

public java.lang.Class[] getParameterTypes()
The return type of each parameter expression.

This information can also be obtained by calling getType on each parameter expression.

Returns:
array providing result type of each parameter expression

getIsConstantValue

public boolean[] getIsConstantValue()
A boolean indicator for each parameter expression that is true if the expression returns a constant result or false if the expression result is not a constant value.

This information can also be obtained by calling isConstantResult on each parameter expression.

Returns:
array providing an indicator per parameter expression that the result is a constant value

getConstantValues

public java.lang.Object[] getConstantValues()
If a parameter expression returns a constant value, the value of the constant it returns is provided in this array.

This information can also be obtained by calling evaluate on each parameter expression providing a constant value.

Returns:
array providing the constant return value per parameter expression that has constant result value, or null if a parameter expression is deemded to not provide a constant result value

isDistinct

public boolean isDistinct()
Returns true to indicate that the 'distinct' keyword was specified for this aggregation function.

Returns:
distinct value indicator

isWindowed

public boolean isWindowed()
Returns true to indicate that all parameter expressions return event properties that originate from a stream that provides a remove stream.

Returns:
windowed indicator

getExpressions

public ExprNode[] getExpressions()
Returns the parameter expressions themselves for interrogation.

Returns:
parameter expressions

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