com.espertech.esper.client.soda
Class Filter

java.lang.Object
  extended by com.espertech.esper.client.soda.Filter
All Implemented Interfaces:
java.io.Serializable

public class Filter
extends java.lang.Object
implements java.io.Serializable

Filter defines the event type to be filtered for, and an optional expression that returns true if the filter should consider the event, or false to reject the event.

See Also:
Serialized Form

Constructor Summary
Filter()
          Ctor.
Filter(java.lang.String eventTypeName)
          Ctor.
Filter(java.lang.String eventTypeName, Expression filter)
          Ctor.
 
Method Summary
static Filter create(java.lang.String eventTypeName)
          Creates a filter to the given named event type.
static Filter create(java.lang.String eventTypeName, Expression filter)
          Creates a filter to the given named event type and filter expression.
 java.lang.String getEventTypeName()
          Returns the name of the event type to filter for.
 Expression getFilter()
          Returns the optional filter expression that tests the event, or null if no filter expression was defined.
 java.util.List<ContainedEventSelect> getOptionalPropertySelects()
          Returns contained-event spec.
 void setEventTypeName(java.lang.String eventTypeName)
          Sets the name of the event type to filter for.
 void setFilter(Expression filter)
          Sets the optional filter expression that tests the event, or null if no filter expression is needed.
 void setOptionalPropertySelects(java.util.List<ContainedEventSelect> optionalPropertySelects)
          Sets the contained-event selection, if any.
 void toEPL(java.io.StringWriter writer, EPStatementFormatter formatter)
          Returns a textual representation of the filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Filter

public Filter()
Ctor.


Filter

public Filter(java.lang.String eventTypeName)
Ctor.

Parameters:
eventTypeName - is the event type name

Filter

public Filter(java.lang.String eventTypeName,
              Expression filter)
Ctor.

Parameters:
eventTypeName - is the event type name
filter - is the filter expression
Method Detail

create

public static Filter create(java.lang.String eventTypeName)
Creates a filter to the given named event type.

Parameters:
eventTypeName - is the event type name to filter for
Returns:
filter

create

public static Filter create(java.lang.String eventTypeName,
                            Expression filter)
Creates a filter to the given named event type and filter expression.

Parameters:
eventTypeName - is the event type name to filter for
filter - is the expression filtering out events
Returns:
filter is the filter expression

getEventTypeName

public java.lang.String getEventTypeName()
Returns the name of the event type to filter for.

Returns:
event type name

setEventTypeName

public void setEventTypeName(java.lang.String eventTypeName)
Sets the name of the event type to filter for.

Parameters:
eventTypeName - name of the event type to filter for

getFilter

public Expression getFilter()
Returns the optional filter expression that tests the event, or null if no filter expression was defined.

Returns:
filter expression

setFilter

public void setFilter(Expression filter)
Sets the optional filter expression that tests the event, or null if no filter expression is needed.

Parameters:
filter - is the filter expression to set

getOptionalPropertySelects

public java.util.List<ContainedEventSelect> getOptionalPropertySelects()
Returns contained-event spec.

Returns:
spec

setOptionalPropertySelects

public void setOptionalPropertySelects(java.util.List<ContainedEventSelect> optionalPropertySelects)
Sets the contained-event selection, if any.

Parameters:
optionalPropertySelects - spec

toEPL

public void toEPL(java.io.StringWriter writer,
                  EPStatementFormatter formatter)
Returns a textual representation of the filter.

Parameters:
writer - to output to
formatter - for newline-whitespace formatting

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