net.esper.core
Class EPEQLStmtStartMethod

java.lang.Object
  extended by net.esper.core.EPEQLStmtStartMethod

public class EPEQLStmtStartMethod
extends java.lang.Object

Starts and provides the stop method for EQL statements.


Constructor Summary
EPEQLStmtStartMethod(java.util.List<SelectExprElement> selectionList, java.util.List<StreamSpec> streams, java.util.List<OuterJoinDesc> outerJoinDescList, ExprNode optionalFilterNode, java.util.List<ExprNode> groupByNodes, ExprNode optionalHavingNode, OutputLimitSpec optionalOutputLimitViewSpecs, java.lang.String eqlStatement, EPServicesContext services)
          Ctor.
 
Method Summary
protected static java.lang.String[] determineStreamNames(java.util.List<StreamSpec> streams)
          Returns a stream name assigned for each stream, generated if none was supplied.
 Pair<Viewable,EPStatementStopMethod> start()
          Starts the EQL statement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EPEQLStmtStartMethod

public EPEQLStmtStartMethod(java.util.List<SelectExprElement> selectionList,
                            java.util.List<StreamSpec> streams,
                            java.util.List<OuterJoinDesc> outerJoinDescList,
                            ExprNode optionalFilterNode,
                            java.util.List<ExprNode> groupByNodes,
                            ExprNode optionalHavingNode,
                            OutputLimitSpec optionalOutputLimitViewSpecs,
                            java.lang.String eqlStatement,
                            EPServicesContext services)
Ctor.

Parameters:
selectionList - describes the list of selected fields, empty list if wildcarded (SELECT-clause)
streams - is a definition of the event streams (FROM-clause)
outerJoinDescList - is a list of outer join descriptors indicating join type and properties (OUTER-JOIN clauses)
optionalFilterNode - is filter conditions that result sets must meet (WHERE clause)
groupByNodes - is a list of expressions that represent the grouping criteria in a group by clause, empty list if none supplied (GROUP BY)
optionalHavingNode - is filter conditions that grouped-by results must meet (HAVING clause)
optionalOutputLimitViewSpecs - is a list of the output rate limiting views, empty list if none supplied (OUTPUT clause)
eqlStatement - is the expression text
services - is the service instances for dependency injection
Method Detail

start

public Pair<Viewable,EPStatementStopMethod> start()
                                           throws ExprValidationException,
                                                  ViewProcessingException
Starts the EQL statement.

Returns:
a viewable to attach to for listening to events, and a stop method to invoke to clean up
Throws:
ExprValidationException - when the expression validation fails
ViewProcessingException - when views cannot be started

determineStreamNames

protected static java.lang.String[] determineStreamNames(java.util.List<StreamSpec> streams)
Returns a stream name assigned for each stream, generated if none was supplied.

Parameters:
streams - - stream specifications
Returns:
array of stream names