com.espertech.esper.client.soda
Class CreateWindowClause

java.lang.Object
  extended by com.espertech.esper.client.soda.CreateWindowClause
All Implemented Interfaces:
java.io.Serializable

public class CreateWindowClause
extends java.lang.Object
implements java.io.Serializable

Create a named window, defining the parameter of the named window such as window name and data window view name(s).

See Also:
Serialized Form

Constructor Summary
CreateWindowClause()
          Ctor.
CreateWindowClause(java.lang.String windowName, java.util.List<View> views)
          Ctor.
CreateWindowClause(java.lang.String windowName, View[] viewArr)
          Ctor.
 
Method Summary
 void addColumn(SchemaColumnDesc col)
          Adds a column for use when create-table syntax is used to define the named window type.
 CreateWindowClause addView(java.lang.String namespace, java.lang.String name)
          Adds an un-parameterized view to the named window.
 CreateWindowClause addView(java.lang.String namespace, java.lang.String name, Expression... parameters)
          Adds a parameterized view to the named window.
 CreateWindowClause addView(java.lang.String namespace, java.lang.String name, java.util.List<Expression> parameters)
          Adds a parameterized view to the named window.
static CreateWindowClause create(java.lang.String windowName, View... views)
          Creates a clause to create a named window.
static CreateWindowClause create(java.lang.String windowName, View view)
          Creates a clause to create a named window.
 java.util.List<SchemaColumnDesc> getColumns()
          Returns all columns for use when create-table syntax is used to define the named window type.
 boolean getInsert()
          Returns true if inserting from another named window, false if not.
 Expression getInsertWhereClause()
          Filter expression for inserting from another named window, or null if not inserting from another named window.
 java.util.List<View> getViews()
          Returns the views onto the named window.
 java.lang.String getWindowName()
          Returns the window name.
 CreateWindowClause insert(boolean insert)
          Sets flag indicating that an insert from another named window should take place at the time of window creation.
 CreateWindowClause insertWhereClause(Expression insertWhereClause)
          Sets the filter expression for inserting from another named window
 boolean isInsert()
          Returns true if inserting from another named window, false if not.
 void setColumns(java.util.List<SchemaColumnDesc> columns)
          Sets the columns for use when create-table syntax is used to define the named window type.
 void setInsert(boolean insert)
          Sets flag indicating that an insert from another named window should take place at the time of window creation.
 void setInsertWhereClause(Expression insertWhereClause)
          Sets the filter expression for inserting from another named window
 void setViews(java.util.List<View> views)
          Sets the views onto the named window.
 void setWindowName(java.lang.String windowName)
          Sets the window name.
 void toEPL(java.io.StringWriter writer)
          Renders the clause in textual representation.
 void toEPLCreateTablePart(java.io.StringWriter writer)
          To-EPL for create-table syntax.
 void toEPLInsertPart(java.io.StringWriter writer)
          Renders the clause in textual representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateWindowClause

public CreateWindowClause()
Ctor.


CreateWindowClause

public CreateWindowClause(java.lang.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(java.lang.String windowName,
                          java.util.List<View> views)
Ctor.

Parameters:
windowName - is the name of the window to create
views - is a list of data window views
Method Detail

create

public static CreateWindowClause create(java.lang.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(java.lang.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(java.lang.String namespace,
                                  java.lang.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(java.lang.String namespace,
                                  java.lang.String name,
                                  java.util.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(java.lang.String namespace,
                                  java.lang.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

toEPL

public void toEPL(java.io.StringWriter writer)
Renders the clause in textual representation.

Parameters:
writer - to output to

toEPLInsertPart

public void toEPLInsertPart(java.io.StringWriter writer)
Renders the clause in textual representation.

Parameters:
writer - to output to

getWindowName

public java.lang.String getWindowName()
Returns the window name.

Returns:
window name

setWindowName

public void setWindowName(java.lang.String windowName)
Sets the window name.

Parameters:
windowName - is the name to set

getViews

public java.util.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(java.util.List<View> views)
Sets the views onto the named window.

Parameters:
views - to set

getColumns

public java.util.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(java.util.List<SchemaColumnDesc> columns)
Sets the columns for use when create-table syntax is used to define the named window type.

Parameters:
columns - to set

toEPLCreateTablePart

public void toEPLCreateTablePart(java.io.StringWriter writer)
To-EPL for create-table syntax.

Parameters:
writer - to use

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com