org.axiondb.engine.rowiterators
Class SortedRowIterator

java.lang.Object
  extended by org.axiondb.engine.rowiterators.DelegatingRowIterator
      extended by org.axiondb.engine.rowiterators.SortedRowIterator
All Implemented Interfaces:
RowIterator
Direct Known Subclasses:
SortedRowIterator.MergeSort

public abstract class SortedRowIterator
extends DelegatingRowIterator

Version:
$Revision: 1.3 $

Nested Class Summary
static class SortedRowIterator.MergeSort
           
 
Field Summary
protected  RowIterator _rowIter
           
 
Constructor Summary
protected SortedRowIterator()
           
 
Method Summary
 void add(Row row)
          Add a Rowat the current position in my underlying collection, or throw UnsupportedOperationException.
static org.apache.commons.collections.comparators.ComparatorChain buildComparatorChain(List orderNodes, RowDecorator rowDecorator)
           
protected abstract  org.apache.commons.collections.primitives.IntList getSortedRowIds(RowIterator unsortedRows, Comparator comparator)
           
protected abstract  List getSortedRowList(RowIterator unsortedRows, Comparator comparator)
           
 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.
 
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, toString, wait, wait, wait
 

Field Detail

_rowIter

protected RowIterator _rowIter
Constructor Detail

SortedRowIterator

protected SortedRowIterator()
Method Detail

add

public void add(Row row)
         throws AxionException
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
Throws:
AxionException

remove

public void remove()
            throws AxionException
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
Throws:
AxionException

set

public void set(Row row)
         throws AxionException
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
Throws:
AxionException

getSortedRowIds

protected abstract org.apache.commons.collections.primitives.IntList getSortedRowIds(RowIterator unsortedRows,
                                                                                     Comparator comparator)
                                                                              throws AxionException
Throws:
AxionException

getSortedRowList

protected abstract List getSortedRowList(RowIterator unsortedRows,
                                         Comparator comparator)
                                  throws AxionException
Throws:
AxionException

buildComparatorChain

public static final org.apache.commons.collections.comparators.ComparatorChain buildComparatorChain(List orderNodes,
                                                                                                    RowDecorator rowDecorator)