com.espertech.esper.client.soda
Class UpdateClause

java.lang.Object
  extended by com.espertech.esper.client.soda.UpdateClause
All Implemented Interfaces:
MetaDefItem, java.io.Serializable

public class UpdateClause
extends java.lang.Object
implements MetaDefItem, java.io.Serializable

Specification for the update clause.

See Also:
Serialized Form

Constructor Summary
UpdateClause()
          Ctor.
UpdateClause(java.lang.String eventType, java.lang.String optionalAsClauseStreamName)
          Ctor.
 
Method Summary
 UpdateClause addAssignment(Expression expression)
          Adds a property to set to the clause.
static UpdateClause create(java.lang.String eventType, Expression expression)
          Ctor.
 java.util.List<Assignment> getAssignments()
          Returns the list of property assignments.
 java.lang.String getEventType()
          Returns the name of the event type to update.
 java.lang.String getOptionalAsClauseStreamName()
          Returns the stream name.
 Expression getOptionalWhereClause()
          Returns the where-clause if any.
static void renderEPLAssignments(java.io.StringWriter writer, java.util.List<Assignment> assignments)
          Write assignments.
 void setAssignments(java.util.List<Assignment> assignments)
          Sets a list of property assignments.
 void setEventType(java.lang.String eventType)
          Returns the name of the event type to update.
 void setOptionalAsClauseStreamName(java.lang.String optionalAsClauseStreamName)
          Returns the stream name.
 void setOptionalWhereClause(Expression optionalWhereClause)
          Sets the where-clause if any.
 void toEPL(java.io.StringWriter writer)
          Renders the clause in EPL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateClause

public UpdateClause()
Ctor.


UpdateClause

public UpdateClause(java.lang.String eventType,
                    java.lang.String optionalAsClauseStreamName)
Ctor.

Parameters:
eventType - the name of the type to update
optionalAsClauseStreamName - as-clause for update, if any
Method Detail

create

public static UpdateClause create(java.lang.String eventType,
                                  Expression expression)
Ctor.

Parameters:
eventType - the name of the type to update
expression - expression returning a value to write
Returns:
update clause

addAssignment

public UpdateClause addAssignment(Expression expression)
Adds a property to set to the clause.

Parameters:
expression - expression providing the new property value
Returns:
clause

getAssignments

public java.util.List<Assignment> getAssignments()
Returns the list of property assignments.

Returns:
pair of property name and expression

setAssignments

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

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

getEventType

public java.lang.String getEventType()
Returns the name of the event type to update.

Returns:
name of type

setEventType

public void setEventType(java.lang.String eventType)
Returns the name of the event type to update.

Parameters:
eventType - name of type

getOptionalWhereClause

public Expression getOptionalWhereClause()
Returns the where-clause if any.

Returns:
where clause

setOptionalWhereClause

public void setOptionalWhereClause(Expression optionalWhereClause)
Sets the where-clause if any.

Parameters:
optionalWhereClause - where clause

getOptionalAsClauseStreamName

public java.lang.String getOptionalAsClauseStreamName()
Returns the stream name.

Returns:
stream name

setOptionalAsClauseStreamName

public void setOptionalAsClauseStreamName(java.lang.String optionalAsClauseStreamName)
Returns the stream name.

Parameters:
optionalAsClauseStreamName - stream name

toEPL

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

Parameters:
writer - to output to

renderEPLAssignments

public static void renderEPLAssignments(java.io.StringWriter writer,
                                        java.util.List<Assignment> assignments)
Write assignments.

Parameters:
writer - to write to
assignments - to write

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