Class OnSetClause
java.lang.Object
com.espertech.esper.common.client.soda.OnClause
com.espertech.esper.common.client.soda.OnSetClause
- All Implemented Interfaces:
Serializable
A clause to assign new values to variables based on a triggering event arriving.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAssignment
(Expression expression) Adds a variable to set to the clause.static OnSetClause
create
(Expression expression) Creates a new on-set clause for setting variables, and adds a variable to set.Returns the list of variable assignments.void
setAssignments
(List<Assignment> assignments) Sets a list of variable assignments.void
toEPL
(StringWriter writer, EPStatementFormatter formatter) Renders the clause in EPL.Methods inherited from class com.espertech.esper.common.client.soda.OnClause
createOnDelete, createOnInsertSplitStream, createOnSelect, createOnSet, createOnUpdate
-
Constructor Details
-
OnSetClause
public OnSetClause()Ctor.
-
-
Method Details
-
create
Creates a new on-set clause for setting variables, and adds a variable to set.- Parameters:
expression
- is the assignment expression providing the new variable value- Returns:
- on-set clause
-
addAssignment
Adds a variable to set to the clause.- Parameters:
expression
- expression providing the new variable value- Returns:
- clause
-
getAssignments
Returns the list of variable assignments.- Returns:
- pair of variable name and expression
-
setAssignments
Sets a list of variable assignments.- Parameters:
assignments
- list of pairs of variable name and expression
-
toEPL
Renders the clause in EPL.- Parameters:
writer
- to output toformatter
- for newline-whitespace formatting
-