isql.groupby
Class Groups

java.lang.Object
  extended by isql.groupby.Groups

public class Groups
extends java.lang.Object

Contains the groups coming from the "group by" clause. The groups are represented as a map that, for each group, maps the values that are constant in the group to the indices of the view lines that are in that group.

Author:
SHZ Oct 29, 2007

Constructor Summary
Groups(ColumnKeyAndType[] arrColumnDef)
           
 
Method Summary
 void add(GroupKey key, int rowIndex)
          The given row index has to be part of the given group
 Array getGroupByColumnValues(ColumnKey key)
          Returns an array with the rows index that are contained in the group, in the order they was found in the original set of columns
 java.util.List<GroupKey> getGroupKeysInOriginalOrder()
           
 java.util.List<java.lang.Integer> getIndicesForGroupKey(GroupKey key)
           
 boolean isGroupByColumnKey(ColumnKey toTest)
          Tests if a column is a group by column, i.e.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Groups

public Groups(ColumnKeyAndType[] arrColumnDef)
Method Detail

add

public void add(GroupKey key,
                int rowIndex)
The given row index has to be part of the given group

Parameters:
key -
rowIndex -

isGroupByColumnKey

public boolean isGroupByColumnKey(ColumnKey toTest)
Tests if a column is a group by column, i.e. it was part of the group by clause

Parameters:
toTest - the identifier of the column
Returns:
true if it is a group by column, false otherwise

getGroupByColumnValues

public Array getGroupByColumnValues(ColumnKey key)
                             throws ISQLException
Returns an array with the rows index that are contained in the group, in the order they was found in the original set of columns

Parameters:
key - the column identifier
Returns:
the array containing for each group the value that the column has in that group
Throws:
ISQLException

getIndicesForGroupKey

public java.util.List<java.lang.Integer> getIndicesForGroupKey(GroupKey key)

getGroupKeysInOriginalOrder

public java.util.List<GroupKey> getGroupKeysInOriginalOrder()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object