org.axiondb.engine.rowiterators
Class GroupedRowIterator

java.lang.Object
  extended by org.axiondb.engine.rowiterators.DelegatingRowIterator
      extended by org.axiondb.engine.rowiterators.GroupedRowIterator
All Implemented Interfaces:
RowIterator

public class GroupedRowIterator
extends DelegatingRowIterator

Processes a "raw" iterator to implement GROUP BY functionality. TODO : improve on the order of the algo TODO : improve on space it accumulate during grouping and applying aggregate function TODO : If it is single table and we have index available then we should use the index

Version:
$Revision: 1.6 $ $Date: 2004/08/17 03:19:30 $

Constructor Summary
GroupedRowIterator(RowIterator rows, Map colIdToFieldMap, List groupBy, List selected)
           
 
Method Summary
 void add(Row row)
          Add a Rowat the current position in my underlying collection, or throw UnsupportedOperationException.
 void remove()
          Set the Rowat the current position in my underlying collection, or throw UnsupportedOperationException.
 void set(Row row)
          Set the Rowat the current position in my underlying collection, or throw UnsupportedOperationException.
 String toString()
           
 
Methods inherited from class org.axiondb.engine.rowiterators.DelegatingRowIterator
current, currentIndex, first, getDelegate, hasCurrent, hasNext, hasPrevious, isEmpty, last, next, nextIndex, peekNext, peekPrevious, previous, previousIndex, reset, setDelegate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GroupedRowIterator

public GroupedRowIterator(RowIterator rows,
                          Map colIdToFieldMap,
                          List groupBy,
                          List selected)
                   throws AxionException
Throws:
AxionException
Method Detail

add

public void add(Row row)
Description copied from interface: RowIterator
Add a Rowat the current position in my underlying collection, or throw UnsupportedOperationException. (Optional operation.)

Specified by:
add in interface RowIterator
Overrides:
add in class DelegatingRowIterator

remove

public void remove()
Description copied from interface: RowIterator
Set the Rowat the current position in my underlying collection, or throw UnsupportedOperationException. (Optional operation.)

Specified by:
remove in interface RowIterator
Overrides:
remove in class DelegatingRowIterator

set

public void set(Row row)
Description copied from interface: RowIterator
Set the Rowat the current position in my underlying collection, or throw UnsupportedOperationException. (Optional operation.)

Specified by:
set in interface RowIterator
Overrides:
set in class DelegatingRowIterator

toString

public String toString()
Overrides:
toString in class Object