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:
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(String variable, Expression expression)
          Adds a variable to set to the clause.
static OnSetClause create(String variableName, Expression expression)
          Creates a new on-set clause for setting variables, and adds a variable to set.
 List<Pair<String,Expression>> getAssignments()
          Returns the list of variable assignments.
 void setAssignments(List<Pair<String,Expression>> assignments)
          Sets a list of variable assignments.
 void toEPL(StringWriter writer)
          Renders the clause in EPL.
 
Methods inherited from class com.espertech.esper.client.soda.OnClause
createOnDelete, createOnSelect, createOnSet
 
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(String variableName,
                                 Expression expression)
Creates a new on-set clause for setting variables, and adds a variable to set.

Parameters:
variableName - is the variable name
expression - is the assignment expression providing the new variable value
Returns:
on-set clause

addAssignment

public OnSetClause addAssignment(String variable,
                                 Expression expression)
Adds a variable to set to the clause.

Parameters:
variable - to set
expression - expression providing the new variable value
Returns:
clause

getAssignments

public List<Pair<String,Expression>> getAssignments()
Returns the list of variable assignments.

Returns:
pair of variable name and expression

setAssignments

public void setAssignments(List<Pair<String,Expression>> assignments)
Sets a list of variable assignments.

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

toEPL

public void toEPL(StringWriter writer)
Renders the clause in EPL.

Parameters:
writer - to output to

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com