Class UpdateClause

java.lang.Object
com.espertech.esper.common.client.soda.UpdateClause
All Implemented Interfaces:
Serializable

public class UpdateClause extends Object implements Serializable
Specification for the update clause.
See Also:
  • Constructor Details

    • UpdateClause

      public UpdateClause()
      Ctor.
    • UpdateClause

      public UpdateClause(String eventType, String optionalAsClauseStreamName)
      Ctor.
      Parameters:
      eventType - the name of the type to update
      optionalAsClauseStreamName - as-clause for update, if any
  • Method Details

    • create

      public static UpdateClause create(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 List<Assignment> getAssignments()
      Returns the list of property assignments.
      Returns:
      pair of property name and expression
    • setAssignments

      public void setAssignments(List<Assignment> assignments)
      Sets a list of property assignments.
      Parameters:
      assignments - list of pairs of property name and expression
    • getEventType

      public String getEventType()
      Returns the name of the event type to update.
      Returns:
      name of type
    • setEventType

      public void setEventType(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 String getOptionalAsClauseStreamName()
      Returns the stream name.
      Returns:
      stream name
    • setOptionalAsClauseStreamName

      public void setOptionalAsClauseStreamName(String optionalAsClauseStreamName)
      Returns the stream name.
      Parameters:
      optionalAsClauseStreamName - stream name
    • toEPL

      public void toEPL(StringWriter writer)
      Renders the clause in EPL.
      Parameters:
      writer - to output to
    • renderEPLAssignments

      public static void renderEPLAssignments(StringWriter writer, List<Assignment> assignments)
      Write assignments.
      Parameters:
      writer - to write to
      assignments - to write