Class OnSetClause

java.lang.Object
com.espertech.esper.common.client.soda.OnClause
com.espertech.esper.common.client.soda.OnSetClause
All Implemented Interfaces:
Serializable

public class OnSetClause extends OnClause
A clause to assign new values to variables based on a triggering event arriving.
See Also:
  • Constructor Details

    • OnSetClause

      public OnSetClause()
      Ctor.
  • Method Details

    • create

      public static OnSetClause create(Expression expression)
      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

      public OnSetClause addAssignment(Expression expression)
      Adds a variable to set to the clause.
      Parameters:
      expression - expression providing the new variable value
      Returns:
      clause
    • getAssignments

      public List<Assignment> getAssignments()
      Returns the list of variable assignments.
      Returns:
      pair of variable name and expression
    • setAssignments

      public void setAssignments(List<Assignment> assignments)
      Sets a list of variable assignments.
      Parameters:
      assignments - list of pairs of variable name and expression
    • toEPL

      public void toEPL(StringWriter writer, EPStatementFormatter formatter)
      Renders the clause in EPL.
      Parameters:
      writer - to output to
      formatter - for newline-whitespace formatting