com.espertech.esper.filter
Class FilterSpecCompiled

java.lang.Object
  extended by com.espertech.esper.filter.FilterSpecCompiled

public final class FilterSpecCompiled
extends java.lang.Object

Contains the filter criteria to sift through events. The filter criteria are the event class to look for and a set of parameters (attribute names, operators and constant/range values).


Constructor Summary
FilterSpecCompiled(EventType eventType, java.lang.String eventTypeName, java.util.List<FilterSpecParam>[] filterParameters, PropertyEvaluator optionalPropertyEvaluator)
          Constructor - validates parameter list against event type, throws exception if invalid property names or mismatcing filter operators are found.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 boolean equalsTypeAndFilter(FilterSpecCompiled other)
          Compares only the type and filter portion and not the property evaluation portion.
 EventType getFilterForEventType()
          Returns type of event to filter for.
 java.lang.String getFilterForEventTypeName()
          Returns the event type name.
 PropertyEvaluator getOptionalPropertyEvaluator()
          Return the evaluator for property value if any is attached, or none if none attached.
 FilterSpecParam[][] getParameters()
          Returns list of filter parameters.
 EventType getResultEventType()
          Returns the result event type of the filter specification.
 FilterValueSet getValueSet(MatchedEventMap matchedEvents, ExprEvaluatorContext evaluatorContext, FilterValueSetParam[][] addendum)
          Returns the values for the filter, using the supplied result events to ask filter parameters for the value to filter for.
 int hashCode()
           
protected static FilterSpecParam[] sortRemoveDups(java.util.List<FilterSpecParam> parameters)
           
protected static FilterSpecParam[][] sortRemoveDups(java.util.List<FilterSpecParam>[] parameters)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FilterSpecCompiled

public FilterSpecCompiled(EventType eventType,
                          java.lang.String eventTypeName,
                          java.util.List<FilterSpecParam>[] filterParameters,
                          PropertyEvaluator optionalPropertyEvaluator)
Constructor - validates parameter list against event type, throws exception if invalid property names or mismatcing filter operators are found.

Parameters:
eventType - is the event type
filterParameters - is a list of filter parameters
eventTypeName - is the name of the event type
optionalPropertyEvaluator - optional if evaluating properties returned by filtered events
Throws:
java.lang.IllegalArgumentException - if validation invalid
Method Detail

getFilterForEventType

public final EventType getFilterForEventType()
Returns type of event to filter for.

Returns:
event type

getParameters

public final FilterSpecParam[][] getParameters()
Returns list of filter parameters.

Returns:
list of filter params

getFilterForEventTypeName

public java.lang.String getFilterForEventTypeName()
Returns the event type name.

Returns:
event type name

getOptionalPropertyEvaluator

public PropertyEvaluator getOptionalPropertyEvaluator()
Return the evaluator for property value if any is attached, or none if none attached.

Returns:
property evaluator

getResultEventType

public EventType getResultEventType()
Returns the result event type of the filter specification.

Returns:
event type

getValueSet

public FilterValueSet getValueSet(MatchedEventMap matchedEvents,
                                  ExprEvaluatorContext evaluatorContext,
                                  FilterValueSetParam[][] addendum)
Returns the values for the filter, using the supplied result events to ask filter parameters for the value to filter for.

Parameters:
matchedEvents - contains the result events to use for determining filter values
Returns:
filter values

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

equalsTypeAndFilter

public boolean equalsTypeAndFilter(FilterSpecCompiled other)
Compares only the type and filter portion and not the property evaluation portion.

Parameters:
other - filter to compare
Returns:
true if same

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

sortRemoveDups

protected static FilterSpecParam[][] sortRemoveDups(java.util.List<FilterSpecParam>[] parameters)

sortRemoveDups

protected static FilterSpecParam[] sortRemoveDups(java.util.List<FilterSpecParam> parameters)

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