Class CreateWindowClause

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

public class CreateWindowClause extends Object implements Serializable
Create a named window, defining the parameter of the named window such as window name and data window view name(s).
See Also:
  • Constructor Details

    • CreateWindowClause

      public CreateWindowClause()
      Ctor.
    • CreateWindowClause

      public CreateWindowClause(String windowName, View[] viewArr)
      Ctor.
      Parameters:
      windowName - is the name of the window to create
      viewArr - is the list of data window views
    • CreateWindowClause

      public CreateWindowClause(String windowName, List<View> views)
      Ctor.
      Parameters:
      windowName - is the name of the window to create
      views - is a list of data window views
  • Method Details

    • create

      public static CreateWindowClause create(String windowName, View view)
      Creates a clause to create a named window.
      Parameters:
      windowName - is the name of the named window
      view - is a data window view
      Returns:
      create window clause
    • create

      public static CreateWindowClause create(String windowName, View... views)
      Creates a clause to create a named window.
      Parameters:
      windowName - is the name of the named window
      views - is the data window views
      Returns:
      create window clause
    • addView

      public CreateWindowClause addView(String namespace, String name)
      Adds an un-parameterized view to the named window.
      Parameters:
      namespace - is the view namespace, for example "win" for most data windows
      name - is the view name, for example "length" for a length window
      Returns:
      named window creation clause
    • addView

      public CreateWindowClause addView(String name)
      Adds an un-parameterized view to the named window.
      Parameters:
      name - is the view name, for example "length" for a length window
      Returns:
      named window creation clause
    • addView

      public CreateWindowClause addView(String namespace, String name, List<Expression> parameters)
      Adds a parameterized view to the named window.
      Parameters:
      namespace - is the view namespace, for example "win" for most data windows
      name - is the view name, for example "length" for a length window
      parameters - is a list of view parameters
      Returns:
      named window creation clause
    • addView

      public CreateWindowClause addView(String name, List<Expression> parameters)
      Adds a parameterized view to the named window.
      Parameters:
      name - is the view name, for example "length" for a length window
      parameters - is a list of view parameters
      Returns:
      named window creation clause
    • addView

      public CreateWindowClause addView(String namespace, String name, Expression... parameters)
      Adds a parameterized view to the named window.
      Parameters:
      namespace - is the view namespace, for example "win" for most data windows
      name - is the view name, for example "length" for a length window
      parameters - is a list of view parameters
      Returns:
      named window creation clause
    • addView

      public CreateWindowClause addView(String name, Expression... parameters)
      Adds a parameterized view to the named window.
      Parameters:
      name - is the view name, for example "length" for a length window
      parameters - is a list of view parameters
      Returns:
      named window creation clause
    • toEPL

      public void toEPL(StringWriter writer)
      Renders the clause in textual representation.
      Parameters:
      writer - to output to
    • toEPLInsertPart

      public void toEPLInsertPart(StringWriter writer)
      Renders the clause in textual representation.
      Parameters:
      writer - to output to
    • getWindowName

      public String getWindowName()
      Returns the window name.
      Returns:
      window name
    • setWindowName

      public void setWindowName(String windowName)
      Sets the window name.
      Parameters:
      windowName - is the name to set
    • getViews

      public List<View> getViews()
      Returns the views onto the named window.
      Returns:
      named window data views
    • isInsert

      public boolean isInsert()
      Returns true if inserting from another named window, false if not.
      Returns:
      insert from named window
    • getInsert

      public boolean getInsert()
      Returns true if inserting from another named window, false if not.
      Returns:
      insert from named window
    • getInsertWhereClause

      public Expression getInsertWhereClause()
      Filter expression for inserting from another named window, or null if not inserting from another named window.
      Returns:
      filter expression
    • insert

      public CreateWindowClause insert(boolean insert)
      Sets flag indicating that an insert from another named window should take place at the time of window creation.
      Parameters:
      insert - true for insert from another named window
      Returns:
      clause
    • setInsert

      public void setInsert(boolean insert)
      Sets flag indicating that an insert from another named window should take place at the time of window creation.
      Parameters:
      insert - true for insert from another named window
    • insertWhereClause

      public CreateWindowClause insertWhereClause(Expression insertWhereClause)
      Sets the filter expression for inserting from another named window
      Parameters:
      insertWhereClause - filter expression
      Returns:
      create window clause
    • setInsertWhereClause

      public void setInsertWhereClause(Expression insertWhereClause)
      Sets the filter expression for inserting from another named window
      Parameters:
      insertWhereClause - filter expression
    • setViews

      public void setViews(List<View> views)
      Sets the views onto the named window.
      Parameters:
      views - to set
    • getColumns

      public List<SchemaColumnDesc> getColumns()
      Returns all columns for use when create-table syntax is used to define the named window type.
      Returns:
      columns
    • addColumn

      public void addColumn(SchemaColumnDesc col)
      Adds a column for use when create-table syntax is used to define the named window type.
      Parameters:
      col - column to add
    • setColumns

      public void setColumns(List<SchemaColumnDesc> columns)
      Sets the columns for use when create-table syntax is used to define the named window type.
      Parameters:
      columns - to set
    • getAsEventTypeName

      public String getAsEventTypeName()
      Returns the as-name.
      Returns:
      as-name
    • setAsEventTypeName

      public CreateWindowClause setAsEventTypeName(String asEventTypeName)
      Sets the as-name.
      Parameters:
      asEventTypeName - as-name
      Returns:
      itself
    • isRetainUnion

      public boolean isRetainUnion()
      Returns the retain-union flag
      Returns:
      indicator
    • setRetainUnion

      public void setRetainUnion(boolean retainUnion)
      Sets the retain-union flag
      Parameters:
      retainUnion - indicator
    • toEPLCreateTablePart

      public void toEPLCreateTablePart(StringWriter writer)
      To-EPL for create-table syntax.
      Parameters:
      writer - to use