net.esper.filter
Class FilterSpecCompiler
java.lang.Object
net.esper.filter.FilterSpecCompiler
public final class FilterSpecCompiler
- extends Object
Helper to compile (validate and optimize) filter expressions as used in pattern and filter-based streams.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTY_NAME_BOOLEAN_EXPRESSION
public static final String PROPERTY_NAME_BOOLEAN_EXPRESSION
- Assigned for filter parameters that are based on boolean expression and not on
any particular property name.
Keeping this artificial property name is a simplification as optimized filter parameters
generally keep a property name.
- See Also:
- Constant Field Values
FilterSpecCompiler
public FilterSpecCompiler()
makeFilterSpec
public static FilterSpecCompiled makeFilterSpec(EventType eventType,
List<ExprNode> filterExpessions,
LinkedHashMap<String,EventType> taggedEventTypes,
StreamTypeService streamTypeService,
MethodResolutionService methodResolutionService)
throws ExprValidationException
- Factory method for compiling filter expressions into a filter specification
for use with filter service.
- Parameters:
eventType
- is the filtered-out event typefilterExpessions
- is a list of filter expressionstaggedEventTypes
- is a map of stream names (tags) and event types availablestreamTypeService
- is used to set rules for resolving propertiesmethodResolutionService
- resolved imports for static methods and such
- Returns:
- compiled filter specification
- Throws:
ExprValidationException
- if the expression or type validations failed
makeFilterParam
protected static FilterSpecParam makeFilterParam(ExprNode constituent)
throws ExprValidationException
- For a given expression determine if this is optimizable and create the filter parameter
representing the expression, or null if not optimizable.
- Parameters:
constituent
- is the expression to look at
- Returns:
- filter parameter representing the expression, or null
- Throws:
ExprValidationException
- if the expression is invalid