public class UpdateClause extends Object implements MetaDefItem, Serializable
Constructor and Description |
---|
UpdateClause()
Ctor.
|
UpdateClause(String eventType,
String optionalAsClauseStreamName)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
UpdateClause |
addAssignment(Expression expression)
Adds a property to set to the clause.
|
static UpdateClause |
create(String eventType,
Expression expression)
Ctor.
|
List<Assignment> |
getAssignments()
Returns the list of property assignments.
|
String |
getEventType()
Returns the name of the event type to update.
|
String |
getOptionalAsClauseStreamName()
Returns the stream name.
|
Expression |
getOptionalWhereClause()
Returns the where-clause if any.
|
static void |
renderEPLAssignments(StringWriter writer,
List<Assignment> assignments)
Write assignments.
|
void |
setAssignments(List<Assignment> assignments)
Sets a list of property assignments.
|
void |
setEventType(String eventType)
Returns the name of the event type to update.
|
void |
setOptionalAsClauseStreamName(String optionalAsClauseStreamName)
Returns the stream name.
|
void |
setOptionalWhereClause(Expression optionalWhereClause)
Sets the where-clause if any.
|
void |
toEPL(StringWriter writer)
Renders the clause in EPL.
|
public static UpdateClause create(String eventType, Expression expression)
eventType
- the name of the type to updateexpression
- expression returning a value to writepublic UpdateClause addAssignment(Expression expression)
expression
- expression providing the new property valuepublic List<Assignment> getAssignments()
public void setAssignments(List<Assignment> assignments)
assignments
- list of pairs of property name and expressionpublic String getEventType()
public void setEventType(String eventType)
eventType
- name of typepublic Expression getOptionalWhereClause()
public void setOptionalWhereClause(Expression optionalWhereClause)
optionalWhereClause
- where clausepublic String getOptionalAsClauseStreamName()
public void setOptionalAsClauseStreamName(String optionalAsClauseStreamName)
optionalAsClauseStreamName
- stream namepublic void toEPL(StringWriter writer)
writer
- to output topublic static void renderEPLAssignments(StringWriter writer, List<Assignment> assignments)
writer
- to write toassignments
- to write