Class OnMergeMatchedInsertAction

java.lang.Object
com.espertech.esper.common.client.soda.OnMergeMatchedInsertAction
All Implemented Interfaces:
OnMergeMatchedAction, Serializable

public class OnMergeMatchedInsertAction extends Object implements OnMergeMatchedAction
For use with on-merge clauses, inserts into a named window if matching rows are not found.
See Also:
  • Constructor Details

    • OnMergeMatchedInsertAction

      public OnMergeMatchedInsertAction(List<String> columnNames, List<SelectClauseElement> selectList, Expression whereClause, String optionalStreamName)
      Ctor.
      Parameters:
      columnNames - insert-into column names, or empty list if none provided
      selectList - select expression list
      whereClause - optional condition or null
      optionalStreamName - optionally a stream name for insert-into
    • OnMergeMatchedInsertAction

      public OnMergeMatchedInsertAction(List<String> columnNames, Expression eventPrecedence, List<SelectClauseElement> selectList, Expression whereClause, String optionalStreamName)
      Ctor.
      Parameters:
      columnNames - insert-into column names, or empty list if none provided
      selectList - select expression list
      whereClause - optional condition or null
      optionalStreamName - optionally a stream name for insert-into
      eventPrecedence - event precedence or null
    • OnMergeMatchedInsertAction

      public OnMergeMatchedInsertAction()
      Ctor.
  • Method Details

    • getWhereClause

      public Expression getWhereClause()
      Returns the action condition, or null if undefined.
      Returns:
      condition
    • setWhereClause

      public void setWhereClause(Expression whereClause)
      Sets the action condition, or null if undefined.
      Parameters:
      whereClause - to set, or null to remove the condition
    • getColumnNames

      public List<String> getColumnNames()
      Returns the insert-into column names, if provided.
      Returns:
      column names
    • setColumnNames

      public void setColumnNames(List<String> columnNames)
      Sets the insert-into column names, can be empty list.
      Parameters:
      columnNames - column names to set
    • getSelectList

      public List<SelectClauseElement> getSelectList()
      Returns the select expressions.
      Returns:
      expression list
    • setSelectList

      public void setSelectList(List<SelectClauseElement> selectList)
      Sets the select expressions.
      Parameters:
      selectList - expression list
    • getOptionalStreamName

      public String getOptionalStreamName()
      Returns the insert-into stream name.
      Returns:
      stream name
    • setOptionalStreamName

      public void setOptionalStreamName(String optionalStreamName)
      Sets the insert-into stream name.
      Parameters:
      optionalStreamName - stream name to insert into
    • getEventPrecedence

      public Expression getEventPrecedence()
      Returns null when no event-precedence is specified for the insert-into, or returns the expression returning the event-precedence
      Returns:
      event-precedence expression
    • setEventPrecedence

      public void setEventPrecedence(Expression eventPrecedence)
      Set to null when no event-precedence is specified for the insert-into, or set an expression returning the event-precedence
      Parameters:
      eventPrecedence - event-precedence expression
    • toEPL

      public void toEPL(StringWriter writer)
      Description copied from interface: OnMergeMatchedAction
      Render to EPL.
      Specified by:
      toEPL in interface OnMergeMatchedAction
      Parameters:
      writer - to render to