Class UpdateClause
java.lang.Object
com.espertech.esper.common.client.soda.UpdateClause
- All Implemented Interfaces:
Serializable
Specification for the update clause.
- See Also:
-
Constructor Summary
ConstructorDescriptionCtor.UpdateClause
(String eventType, String optionalAsClauseStreamName) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionaddAssignment
(Expression expression) Adds a property to set to the clause.static UpdateClause
create
(String eventType, Expression expression) Ctor.Returns the list of property assignments.Returns the name of the event type to update.Returns the stream name.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.
-
Constructor Details
-
UpdateClause
public UpdateClause()Ctor. -
UpdateClause
Ctor.- Parameters:
eventType
- the name of the type to updateoptionalAsClauseStreamName
- as-clause for update, if any
-
-
Method Details
-
create
Ctor.- Parameters:
eventType
- the name of the type to updateexpression
- expression returning a value to write- Returns:
- update clause
-
addAssignment
Adds a property to set to the clause.- Parameters:
expression
- expression providing the new property value- Returns:
- clause
-
getAssignments
Returns the list of property assignments.- Returns:
- pair of property name and expression
-
setAssignments
Sets a list of property assignments.- Parameters:
assignments
- list of pairs of property name and expression
-
getEventType
Returns the name of the event type to update.- Returns:
- name of type
-
setEventType
Returns the name of the event type to update.- Parameters:
eventType
- name of type
-
getOptionalWhereClause
Returns the where-clause if any.- Returns:
- where clause
-
setOptionalWhereClause
Sets the where-clause if any.- Parameters:
optionalWhereClause
- where clause
-
getOptionalAsClauseStreamName
Returns the stream name.- Returns:
- stream name
-
setOptionalAsClauseStreamName
Returns the stream name.- Parameters:
optionalAsClauseStreamName
- stream name
-
toEPL
Renders the clause in EPL.- Parameters:
writer
- to output to
-
renderEPLAssignments
Write assignments.- Parameters:
writer
- to write toassignments
- to write
-