public class Filter extends Object implements Serializable
Constructor and Description |
---|
Filter()
Ctor.
|
Filter(String eventTypeName)
Ctor.
|
Filter(String eventTypeName,
Expression filter)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
static Filter |
create(String eventTypeName)
Creates a filter to the given named event type.
|
static Filter |
create(String eventTypeName,
Expression filter)
Creates a filter to the given named event type and filter expression.
|
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.
|
List<ContainedEventSelect> |
getOptionalPropertySelects()
Returns contained-event spec.
|
void |
setEventTypeName(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(List<ContainedEventSelect> optionalPropertySelects)
Sets the contained-event selection, if any.
|
void |
toEPL(StringWriter writer,
EPStatementFormatter formatter)
Returns a textual representation of the filter.
|
public Filter()
public Filter(String eventTypeName)
eventTypeName
- is the event type namepublic Filter(String eventTypeName, Expression filter)
eventTypeName
- is the event type namefilter
- is the filter expressionpublic static Filter create(String eventTypeName)
eventTypeName
- is the event type name to filter forpublic static Filter create(String eventTypeName, Expression filter)
eventTypeName
- is the event type name to filter forfilter
- is the expression filtering out eventspublic String getEventTypeName()
public void setEventTypeName(String eventTypeName)
eventTypeName
- name of the event type to filter forpublic Expression getFilter()
public void setFilter(Expression filter)
filter
- is the filter expression to setpublic List<ContainedEventSelect> getOptionalPropertySelects()
public void setOptionalPropertySelects(List<ContainedEventSelect> optionalPropertySelects)
optionalPropertySelects
- specpublic void toEPL(StringWriter writer, EPStatementFormatter formatter)
writer
- to output toformatter
- for newline-whitespace formatting