|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.client.soda.EPStatementObjectModel
public class EPStatementObjectModel
Object model of an EPL statement.
Applications can create an object model by instantiating this class and then setting the various clauses.
When done, use EPAdministrator
to create a statement from the model.
Alternativly, a given textual EPL can be compiled into an object model representation via the compile method on
EPAdministrator
.
Use the toEPL method to generate a textual EPL from an object model.
Minimally, and EPL statement consists of the select-clause and the where-clause. These are represented by SelectClause
and FromClause
respectively.
Here is a short example that create a simple EPL statement such as "select page, responseTime from PageLoad" :
EPStatementObjectModel model = new EPStatementObjectModel(); model.setSelectClause(SelectClause.create("page", "responseTime")); model.setFromClause(FromClause.create(FilterStream.create("PageLoad")));
The select-clause and from-clause must be set for the statement object model to be useable by the administrative API. All other clauses a optional.
Please see the documentation set for further examples.
Constructor Summary | |
---|---|
EPStatementObjectModel()
Ctor. |
Method Summary | |
---|---|
CreateVariableClause |
getCreateVariable()
Returns the create-variable clause if this is a statement creating a variable, or null if not. |
CreateWindowClause |
getCreateWindow()
Returns the create-window clause for creating named windows, or null if this statement does not create a named window. |
FromClause |
getFromClause()
Return the from-clause. |
GroupByClause |
getGroupByClause()
Return the group-by-clause, or null to indicate that the clause is absent. |
Expression |
getHavingClause()
Return the having-clause, or null to indicate that the clause is absent. |
InsertIntoClause |
getInsertInto()
Return the insert-into-clause, or null to indicate that the clause is absent. |
OnClause |
getOnExpr()
Returns the on-delete clause for deleting from named windows, or null if this statement does not delete from a named window |
OrderByClause |
getOrderByClause()
Return the order-by-clause, or null to indicate that the clause is absent. |
OutputLimitClause |
getOutputLimitClause()
Return the output-rate-limiting-clause, or null to indicate that the clause is absent. |
SelectClause |
getSelectClause()
Return the select-clause. |
Expression |
getWhereClause()
Return the where-clause, or null to indicate that the clause is absent. |
void |
setCreateVariable(CreateVariableClause createVariable)
Sets the create-variable clause if this is a statement creating a variable, or null if not. |
void |
setCreateWindow(CreateWindowClause createWindow)
Sets the create-window clause for creating named windows, or null if this statement does not create a named window. |
EPStatementObjectModel |
setFromClause(FromClause fromClause)
Specify a from-clause. |
EPStatementObjectModel |
setGroupByClause(GroupByClause groupByClause)
Specify a group-by-clause. |
EPStatementObjectModel |
setHavingClause(Expression havingClause)
Specify a having-clause. |
EPStatementObjectModel |
setInsertInto(InsertIntoClause insertInto)
Specify an insert-into-clause. |
void |
setOnExpr(OnClause onExpr)
Sets the on-delete or on-select clause for selecting or deleting from named windows, or null if this statement does not on-select or on-delete from a named window |
EPStatementObjectModel |
setOrderByClause(OrderByClause orderByClause)
Specify an order-by-clause. |
EPStatementObjectModel |
setOutputLimitClause(OutputLimitClause outputLimitClause)
Specify an output-rate-limiting-clause. |
EPStatementObjectModel |
setSelectClause(SelectClause selectClause)
Specify a select-clause. |
EPStatementObjectModel |
setWhereClause(Expression whereClause)
Specify a where-clause. |
String |
toEPL()
Renders the object model in it's EPL syntax textual representation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EPStatementObjectModel()
Method Detail |
---|
public EPStatementObjectModel setInsertInto(InsertIntoClause insertInto)
insertInto
- specifies the insert-into-clause, or null to indicate that the clause is absent
public InsertIntoClause getInsertInto()
public EPStatementObjectModel setSelectClause(SelectClause selectClause)
selectClause
- specifies the select-clause, the select-clause cannot be null and must be set
public SelectClause getSelectClause()
public EPStatementObjectModel setFromClause(FromClause fromClause)
fromClause
- specifies the from-clause, the from-clause cannot be null and must be set
public Expression getWhereClause()
public EPStatementObjectModel setWhereClause(Expression whereClause)
whereClause
- specifies the where-clause, which is optional and can be null
public FromClause getFromClause()
public GroupByClause getGroupByClause()
public EPStatementObjectModel setGroupByClause(GroupByClause groupByClause)
groupByClause
- specifies the group-by-clause, which is optional and can be null
public Expression getHavingClause()
public EPStatementObjectModel setHavingClause(Expression havingClause)
havingClause
- specifies the having-clause, which is optional and can be null
public OrderByClause getOrderByClause()
public EPStatementObjectModel setOrderByClause(OrderByClause orderByClause)
orderByClause
- specifies the order-by-clause, which is optional and can be null
public OutputLimitClause getOutputLimitClause()
public EPStatementObjectModel setOutputLimitClause(OutputLimitClause outputLimitClause)
outputLimitClause
- specifies the output-rate-limiting-clause, which is optional and can be null
public String toEPL()
IllegalStateException
- if required clauses do not existpublic CreateWindowClause getCreateWindow()
public void setCreateWindow(CreateWindowClause createWindow)
createWindow
- is the named window creation clausepublic OnClause getOnExpr()
public void setOnExpr(OnClause onExpr)
onExpr
- is the on-expression (on-select and on-delete) clause to setpublic CreateVariableClause getCreateVariable()
public void setCreateVariable(CreateVariableClause createVariable)
createVariable
- create-variable clause
|
© 2007 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |