com.espertech.esper.filter
Class FilterSpecParamEventProp

java.lang.Object
  extended by com.espertech.esper.filter.FilterSpecParam
      extended by com.espertech.esper.filter.FilterSpecParamEventProp
All Implemented Interfaces:
MetaDefItem, Serializable

public final class FilterSpecParamEventProp
extends FilterSpecParam

This class represents a filter parameter containing a reference to another event's property in the event pattern result, for use to describe a filter parameter in a FilterSpecCompiled filter specification.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.espertech.esper.filter.FilterSpecParam
propertyName
 
Constructor Summary
FilterSpecParamEventProp(String propertyName, FilterOperator filterOperator, String resultEventAsName, String resultEventProperty, boolean isMustCoerce, Class coercionType)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
           
 Class getCoercionType()
          Returns the numeric coercion type.
 Object getFilterValue(MatchedEventMap matchedEvents)
          Return the filter parameter constant to filter for.
 String getResultEventAsName()
          Returns tag for result event.
 String getResultEventProperty()
          Returns the property of the result event.
 int hashCode()
           
 boolean isMustCoerce()
          Returns true if numeric coercion is required, or false if not
 String toString()
           
 
Methods inherited from class com.espertech.esper.filter.FilterSpecParam
getFilterOperator, getPropertyName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FilterSpecParamEventProp

public FilterSpecParamEventProp(String propertyName,
                                FilterOperator filterOperator,
                                String resultEventAsName,
                                String resultEventProperty,
                                boolean isMustCoerce,
                                Class coercionType)
                         throws IllegalArgumentException
Constructor.

Parameters:
propertyName - is the event property name
filterOperator - is the type of compare
resultEventAsName - is the name of the result event from which to get a property value to compare
resultEventProperty - is the name of the property to get from the named result event
isMustCoerce - indicates on whether numeric coercion must be performed
coercionType - indicates the numeric coercion type to use
Throws:
IllegalArgumentException - if an operator was supplied that does not take a single constant value
Method Detail

isMustCoerce

public boolean isMustCoerce()
Returns true if numeric coercion is required, or false if not

Returns:
true to coerce at runtime

getCoercionType

public Class getCoercionType()
Returns the numeric coercion type.

Returns:
type to coerce to

getResultEventAsName

public String getResultEventAsName()
Returns tag for result event.

Returns:
tag

getResultEventProperty

public String getResultEventProperty()
Returns the property of the result event.

Returns:
property name

getFilterValue

public Object getFilterValue(MatchedEventMap matchedEvents)
Description copied from class: FilterSpecParam
Return the filter parameter constant to filter for.

Specified by:
getFilterValue in class FilterSpecParam
Parameters:
matchedEvents - is the prior results that can be used to determine filter parameters
Returns:
filter parameter constant's value

toString

public final String toString()
Overrides:
toString in class FilterSpecParam

equals

public boolean equals(Object obj)
Overrides:
equals in class FilterSpecParam

hashCode

public int hashCode()
Overrides:
hashCode in class FilterSpecParam

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com