net.esper.eql.core
Class ResultSetProcessorRowForAll

java.lang.Object
  extended by net.esper.eql.core.ResultSetProcessorRowForAll
All Implemented Interfaces:
ResultSetProcessor

public class ResultSetProcessorRowForAll
extends Object
implements ResultSetProcessor

Result set processor for the case: aggregation functions used in the select clause, and no group-by, and all properties in the select clause are under an aggregation function.

This processor does not perform grouping, every event entering and leaving is in the same group. Produces one old event and one new event row every time either at least one old or new event is received. Aggregation state is simply one row holding all the state.


Constructor Summary
ResultSetProcessorRowForAll(SelectExprProcessor selectExprProcessor, AggregationService aggregationService, ExprNode optionalHavingNode)
          Ctor.
 
Method Summary
 Iterator<EventBean> getIterator(Viewable parent)
          Returns the iterator implementing the group-by and aggregation and order-by logic specific to each case of use of these construct.
 EventType getResultEventType()
          Returns the event type of processed results.
 Pair<EventBean[],EventBean[]> processJoinResult(Set<MultiKey<EventBean>> newEvents, Set<MultiKey<EventBean>> oldEvents)
          For use by joins posting their result, process the event rows that are entered and removed (new and old events).
 Pair<EventBean[],EventBean[]> processViewResult(EventBean[] newData, EventBean[] oldData)
          For use by views posting their result, process the event rows that are entered and removed (new and old events).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultSetProcessorRowForAll

public ResultSetProcessorRowForAll(SelectExprProcessor selectExprProcessor,
                                   AggregationService aggregationService,
                                   ExprNode optionalHavingNode)
Ctor.

Parameters:
selectExprProcessor - - for processing the select expression and generting the final output rows
aggregationService - - handles aggregation
optionalHavingNode - - having clause expression node
Method Detail

getResultEventType

public EventType getResultEventType()
Description copied from interface: ResultSetProcessor
Returns the event type of processed results.

Specified by:
getResultEventType in interface ResultSetProcessor
Returns:
event type of the resulting events posted by the processor.

processJoinResult

public Pair<EventBean[],EventBean[]> processJoinResult(Set<MultiKey<EventBean>> newEvents,
                                                       Set<MultiKey<EventBean>> oldEvents)
Description copied from interface: ResultSetProcessor
For use by joins posting their result, process the event rows that are entered and removed (new and old events). Processes according to select-clauses, group-by clauses and having-clauses and returns new events and old events as specified.

Specified by:
processJoinResult in interface ResultSetProcessor
Parameters:
newEvents - - new events posted by join
oldEvents - - old events posted by join
Returns:
pair of new events and old events

processViewResult

public Pair<EventBean[],EventBean[]> processViewResult(EventBean[] newData,
                                                       EventBean[] oldData)
Description copied from interface: ResultSetProcessor
For use by views posting their result, process the event rows that are entered and removed (new and old events). Processes according to select-clauses, group-by clauses and having-clauses and returns new events and old events as specified.

Specified by:
processViewResult in interface ResultSetProcessor
Parameters:
newData - - new events posted by view
oldData - - old events posted by view
Returns:
pair of new events and old events

getIterator

public Iterator<EventBean> getIterator(Viewable parent)
Description copied from interface: ResultSetProcessor
Returns the iterator implementing the group-by and aggregation and order-by logic specific to each case of use of these construct.

Specified by:
getIterator in interface ResultSetProcessor
Parameters:
parent - is the parent view iterator
Returns:
event iterator