Class OnInsertSplitStreamClause

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

public class OnInsertSplitStreamClause extends OnClause
A clause to insert into zero, one or more streams based on criteria.
See Also:
  • Constructor Details

    • OnInsertSplitStreamClause

      public OnInsertSplitStreamClause()
      Ctor.
    • OnInsertSplitStreamClause

      public OnInsertSplitStreamClause(boolean isFirst, List<OnInsertSplitStreamItem> items)
      Ctor.
      Parameters:
      isFirst - indicator whether only the first where-clause is to match or all where-clauses.
      items - tuples of insert-into, select and where-clauses.
  • Method Details

    • create

      public static OnInsertSplitStreamClause create(boolean isFirst, List<OnInsertSplitStreamItem> items)
      Creates a split-stream on-insert clause from an indicator whether to consider the first of all where-clauses, and a list of items.
      Parameters:
      isFirst - true for first where-clause, false for all where-clauses fire
      items - is a list of insert-into, select and optional where-clauses
      Returns:
      split-stream on-insert clause
    • create

      public static OnInsertSplitStreamClause create()
      Creates an split-stream on-insert clause considering only the first where-clause that matches.
      Returns:
      split-stream on-insert clause
    • toEPL

      public void toEPL(StringWriter writer, EPStatementFormatter formatter)
      Renders the clause in textual representation.
      Parameters:
      writer - to output to
      formatter - for newline-whitespace formatting
    • isFirst

      public boolean isFirst()
      Returns true for firing the insert-into for only the first where-clause that matches, or false for firing the insert-into for all where-clauses that match.
      Returns:
      indicator first or all
    • getFirst

      public boolean getFirst()
      Returns true for firing the insert-into for only the first where-clause that matches, or false for firing the insert-into for all where-clauses that match.
      Returns:
      indicator first or all
    • setFirst

      public void setFirst(boolean first)
      Set to true for firing the insert-into for only the first where-clause that matches, or false for firing the insert-into for all where-clauses that match.
      Parameters:
      first - indicator first or all
    • getItems

      public List<OnInsertSplitStreamItem> getItems()
      Returns a list of insert-into, select and where-clauses.
      Returns:
      split-stream lines
    • setItems

      public void setItems(List<OnInsertSplitStreamItem> items)
      Sets a list of insert-into, select and where-clauses.
      Parameters:
      items - split-stream lines
    • addItem

      public void addItem(OnInsertSplitStreamItem item)
      Add a insert-into, select and where-clause.
      Parameters:
      item - to add