isql
Class GroupBy

java.lang.Object
  extended by isql.GroupBy

public class GroupBy
extends java.lang.Object

Builds the group by structure. The idea is that, after composed the so called "where view", which contains references to the rows of the tables are part of the query result, on that rows it applies the group by clause, producing groups of rows. Each group is defined by the group by columns, for which the rows values are always the same.

Author:
SHZ Oct 2, 2007

Constructor Summary
GroupBy(java.util.List<ColumnKey> lstColumnKey)
          Constructor
 
Method Summary
 Groups apply(ColumnValuesWithRowsNumber values)
          Divides the result set in sets of rows, one set of rows for each group.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupBy

public GroupBy(java.util.List<ColumnKey> lstColumnKey)
Constructor

Parameters:
lstColumnKey - the columns in the GROUP BY
Method Detail

apply

public Groups apply(ColumnValuesWithRowsNumber values)
             throws ISQLException
Divides the result set in sets of rows, one set of rows for each group. Each group is identified by the values of the GROUP BY columns, which are the same for all rows in the group.

Parameters:
values - the current result set
Returns:
the Groups structure, containing all the groups
Throws:
ISQLException