This ResultSet evaluates grouped, non distinct aggregates.
It will scan the entire source result set and calculate
the grouped aggregates when scanning the source during the
first call to next().
author: jerry (broken out from SortResultSet)
GroupedAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, int orderingItem, Activation a, GeneratedMethod ra, int maxRowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost) Constructor
Parameters: s - input result set Parameters: isInSortedOrder - true if the source results are in sorted order Parameters: aggregateItem - indicates the number of theSavedObject off of the PreparedStatement that holds theAggregatorInfoList used by this routine.
Method Summary
public void
close() If the result set has been opened,
close the open scan.
public void
closeSource() Close the source of whatever we have been scanning.
getRowLocation() This result set has its row location from
the last fetch done.
public long
getTimeSpent(int type) Return the total amount of time spent in this ResultSet
Parameters: type - CURRENT_RESULTSET_ONLY - time spent only in this ResultSetENTIRE_RESULTSET_TREE - time spent in this ResultSet and below.
GroupedAggregateResultSet(NoPutResultSet s, boolean isInSortedOrder, int aggregateItem, int orderingItem, Activation a, GeneratedMethod ra, int maxRowSize, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException(Code)
Constructor
Parameters: s - input result set Parameters: isInSortedOrder - true if the source results are in sorted order Parameters: aggregateItem - indicates the number of theSavedObject off of the PreparedStatement that holds theAggregatorInfoList used by this routine. Parameters: orderingItem - indicates the number of theSavedObject off of the PreparedStatement that holds theColumOrdering array used by this routine Parameters: a - activation Parameters: ra - generated method to build an emptyoutput row Parameters: maxRowSize - approx row size, passed to sorter Parameters: resultSetNumber - The resultSetNumber for this result set exception: StandardException - Thrown on error
This result set has its row from the last fetch done.
If the cursor is closed, a null is returned.
See Also:CursorResultSet the last row returned; exception: StandardException - thrown on failure.
Return the next row.
exception: StandardException - thrown on failure. exception: StandardException - ResultSetNotOpen thrown if not yet open. the next row in the result
This result set has its row location from
the last fetch done. If the cursor is closed,
a null is returned.
See Also:CursorResultSet the row location of the current cursor row. exception: StandardException - thrown on failure to get row location
Return the total amount of time spent in this ResultSet
Parameters: type - CURRENT_RESULTSET_ONLY - time spent only in this ResultSetENTIRE_RESULTSET_TREE - time spent in this ResultSet and below. long The total amount of time spent (in milliseconds).