Class OnMergeClause

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

public class OnMergeClause extends OnClause
A clause to insert, update or delete to/from a named window based on a triggering event arriving and correlated to the named window events to be updated.
See Also:
  • Constructor Details

    • OnMergeClause

      public OnMergeClause()
      Ctor.
    • OnMergeClause

      public OnMergeClause(String windowName, String optionalAsName, List<OnMergeMatchItem> matchItems)
      Ctor.
      Parameters:
      windowName - is the named window name
      optionalAsName - is the as-provided name of the named window
      matchItems - is the matched and non-matched action items
  • Method Details

    • create

      public static OnMergeClause create(String windowName, String optionalAsName, List<OnMergeMatchItem> matchItems)
      Creates an on-update clause.
      Parameters:
      windowName - is the named window name
      optionalAsName - is the optional as-provided name
      matchItems - is the matched and non-matched action items
      Returns:
      on-update clause without assignments
    • toEPL

      public void toEPL(StringWriter writer, Expression optionalWhereClause, EPStatementFormatter formatter)
      Renders the clause in textual representation.
      Parameters:
      writer - to output to
      optionalWhereClause - where clause if present, or null
      formatter - for newline-whitespace formatting
    • getWindowName

      public String getWindowName()
      Returns the name of the named window to update.
      Returns:
      named window name
    • setWindowName

      public void setWindowName(String windowName)
      Sets the name of the named window.
      Parameters:
      windowName - window name
    • getOptionalAsName

      public String getOptionalAsName()
      Returns the as-provided name for the named window.
      Returns:
      name or null
    • setOptionalAsName

      public void setOptionalAsName(String optionalAsName)
      Sets the as-provided for the named window.
      Parameters:
      optionalAsName - name to set for window
    • addAction

      public OnMergeClause addAction(OnMergeMatchItem action)
      Add a new action to the list of actions.
      Parameters:
      action - to add
      Returns:
      clause
    • getMatchItems

      public List<OnMergeMatchItem> getMatchItems()
      Returns all actions.
      Returns:
      actions
    • setMatchItems

      public void setMatchItems(List<OnMergeMatchItem> matchItems)
      Sets all actions.
      Parameters:
      matchItems - to set
    • setInsertNoMatch

      public void setInsertNoMatch(OnMergeMatchedInsertAction insertNoMatch)
      Sets an optional insert to executed without a match-clause. If set indicates there is no match-clause.
      Parameters:
      insertNoMatch - insert
    • getInsertNoMatch

      public OnMergeMatchedInsertAction getInsertNoMatch()
      Reutrns an optional insert to executed without a match-clause. If set indicates there is no match-clause.
      Returns:
      insert