public final class FilterSpecCompiler
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTY_NAME_BOOLEAN_EXPRESSION
Assigned for filter parameters that are based on boolean expression and not on
any particular property name.
|
Constructor and Description |
---|
FilterSpecCompiler() |
Modifier and Type | Method and Description |
---|---|
static FilterSpecCompiled |
build(java.util.List<ExprNode> validatedNodes,
EventType eventType,
java.lang.String eventTypeName,
PropertyEvalSpec optionalPropertyEvalSpec,
java.util.LinkedHashMap<java.lang.String,Pair<EventType,java.lang.String>> taggedEventTypes,
java.util.LinkedHashMap<java.lang.String,Pair<EventType,java.lang.String>> arrayEventTypes,
StreamTypeService streamTypeService,
java.lang.String optionalStreamName,
StatementContext stmtContext,
java.util.Collection<java.lang.Integer> assignedTypeNumberStack) |
static FilterSpecCompiled |
buildNoStmtCtx(java.util.List<ExprNode> validatedFilterNodes,
EventType eventType,
java.lang.String eventTypeName,
PropertyEvalSpec optionalPropertyEvalSpec,
java.util.LinkedHashMap<java.lang.String,Pair<EventType,java.lang.String>> taggedEventTypes,
java.util.LinkedHashMap<java.lang.String,Pair<EventType,java.lang.String>> arrayEventTypes,
StreamTypeService streamTypeService,
java.lang.String optionalStreamName,
java.util.Collection<java.lang.Integer> assignedTypeNumberStack,
ExprEvaluatorContext exprEvaluatorContext,
int statementId,
java.lang.String statementName,
java.lang.annotation.Annotation[] annotations,
ContextDescriptor contextDescriptor,
EngineImportService engineImportService,
EventAdapterService eventAdapterService,
FilterBooleanExpressionFactory filterBooleanExpressionFactory,
TimeProvider timeProvider,
VariableService variableService,
TableService tableService,
ConfigurationInformation configurationInformation,
NamedWindowMgmtService namedWindowMgmtService,
StatementExtensionSvcContext statementExtensionSvcContext) |
static FilterSpecCompiled |
makeFilterSpec(EventType eventType,
java.lang.String eventTypeName,
java.util.List<ExprNode> filterExpessions,
PropertyEvalSpec optionalPropertyEvalSpec,
java.util.LinkedHashMap<java.lang.String,Pair<EventType,java.lang.String>> taggedEventTypes,
java.util.LinkedHashMap<java.lang.String,Pair<EventType,java.lang.String>> arrayEventTypes,
StreamTypeService streamTypeService,
java.lang.String optionalStreamName,
StatementContext statementContext,
java.util.Collection<java.lang.Integer> assignedTypeNumberStack)
Factory method for compiling filter expressions into a filter specification
for use with filter service.
|
static java.util.List<ExprNode> |
validateAllowSubquery(ExprNodeOrigin exprNodeOrigin,
java.util.List<ExprNode> exprNodes,
StreamTypeService streamTypeService,
StatementContext statementContext,
java.util.LinkedHashMap<java.lang.String,Pair<EventType,java.lang.String>> taggedEventTypes,
java.util.LinkedHashMap<java.lang.String,Pair<EventType,java.lang.String>> arrayEventTypes)
Validates expression nodes and returns a list of validated nodes.
|
public static final java.lang.String PROPERTY_NAME_BOOLEAN_EXPRESSION
Keeping this artificial property name is a simplification as optimized filter parameters generally keep a property name.
public static FilterSpecCompiled makeFilterSpec(EventType eventType, java.lang.String eventTypeName, java.util.List<ExprNode> filterExpessions, PropertyEvalSpec optionalPropertyEvalSpec, java.util.LinkedHashMap<java.lang.String,Pair<EventType,java.lang.String>> taggedEventTypes, java.util.LinkedHashMap<java.lang.String,Pair<EventType,java.lang.String>> arrayEventTypes, StreamTypeService streamTypeService, java.lang.String optionalStreamName, StatementContext statementContext, java.util.Collection<java.lang.Integer> assignedTypeNumberStack) throws ExprValidationException
eventType
- is the filtered-out event typeeventTypeName
- is the name of the event typefilterExpessions
- is a list of filter expressionstaggedEventTypes
- is a map of stream names (tags) and event types availablearrayEventTypes
- is a map of name tags and event type per tag for repeat-expressions that generate an array of eventsstreamTypeService
- is used to set rules for resolving propertiesoptionalStreamName
- - the stream name, if providedoptionalPropertyEvalSpec
- - specification for evaluating propertiesstatementContext
- context for statementassignedTypeNumberStack
- type numbers assignedExprValidationException
- if the expression or type validations failedpublic static FilterSpecCompiled build(java.util.List<ExprNode> validatedNodes, EventType eventType, java.lang.String eventTypeName, PropertyEvalSpec optionalPropertyEvalSpec, java.util.LinkedHashMap<java.lang.String,Pair<EventType,java.lang.String>> taggedEventTypes, java.util.LinkedHashMap<java.lang.String,Pair<EventType,java.lang.String>> arrayEventTypes, StreamTypeService streamTypeService, java.lang.String optionalStreamName, StatementContext stmtContext, java.util.Collection<java.lang.Integer> assignedTypeNumberStack) throws ExprValidationException
ExprValidationException
public static FilterSpecCompiled buildNoStmtCtx(java.util.List<ExprNode> validatedFilterNodes, EventType eventType, java.lang.String eventTypeName, PropertyEvalSpec optionalPropertyEvalSpec, java.util.LinkedHashMap<java.lang.String,Pair<EventType,java.lang.String>> taggedEventTypes, java.util.LinkedHashMap<java.lang.String,Pair<EventType,java.lang.String>> arrayEventTypes, StreamTypeService streamTypeService, java.lang.String optionalStreamName, java.util.Collection<java.lang.Integer> assignedTypeNumberStack, ExprEvaluatorContext exprEvaluatorContext, int statementId, java.lang.String statementName, java.lang.annotation.Annotation[] annotations, ContextDescriptor contextDescriptor, EngineImportService engineImportService, EventAdapterService eventAdapterService, FilterBooleanExpressionFactory filterBooleanExpressionFactory, TimeProvider timeProvider, VariableService variableService, TableService tableService, ConfigurationInformation configurationInformation, NamedWindowMgmtService namedWindowMgmtService, StatementExtensionSvcContext statementExtensionSvcContext) throws ExprValidationException
ExprValidationException
public static java.util.List<ExprNode> validateAllowSubquery(ExprNodeOrigin exprNodeOrigin, java.util.List<ExprNode> exprNodes, StreamTypeService streamTypeService, StatementContext statementContext, java.util.LinkedHashMap<java.lang.String,Pair<EventType,java.lang.String>> taggedEventTypes, java.util.LinkedHashMap<java.lang.String,Pair<EventType,java.lang.String>> arrayEventTypes) throws ExprValidationException
exprNodes
- is the nodes to validatestreamTypeService
- is provding type information for each streamtaggedEventTypes
- pattern tagged typesarrayEventTypes
- event types that provide array valuesstatementContext
- contextexprNodeOrigin
- originExprValidationException
- for validation errors