com.espertech.esper.client.soda
Class OnSetClause

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

public class OnSetClause
extends OnClause

A clause to assign new values to variables based on a triggering event arriving.

See Also:
Serialized Form

Constructor Summary
OnSetClause()
          Ctor.
 
Method Summary
 OnSetClause addAssignment(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.
 java.util.List<Assignment> getAssignments()
          Returns the list of variable assignments.
 void setAssignments(java.util.List<Assignment> assignments)
          Sets a list of variable assignments.
 void toEPL(java.io.StringWriter writer, EPStatementFormatter formatter)
          Renders the clause in EPL.
 
Methods inherited from class com.espertech.esper.client.soda.OnClause
createOnDelete, createOnInsertSplitStream, createOnSelect, createOnSet, createOnUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OnSetClause

public OnSetClause()
Ctor.

Method Detail

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 java.util.List<Assignment> getAssignments()
Returns the list of variable assignments.

Returns:
pair of variable name and expression

setAssignments

public void setAssignments(java.util.List<Assignment> assignments)
Sets a list of variable assignments.

Parameters:
assignments - list of pairs of variable name and expression

toEPL

public void toEPL(java.io.StringWriter writer,
                  EPStatementFormatter formatter)
Renders the clause in EPL.

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

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