org.axiondb.engine.rowiterators
Class ChangingIndexedRowIterator

java.lang.Object
  extended byorg.axiondb.engine.rowiterators.DelegatingRowIterator
      extended byorg.axiondb.engine.rowiterators.ChangingIndexedRowIterator
All Implemented Interfaces:
MutableIndexedRowIterator, RowIterator

public class ChangingIndexedRowIterator
extends DelegatingRowIterator
implements MutableIndexedRowIterator

A DelegatingRowIterator that is wraps a RowIterator from some Index, and that can be reset to recreate the iterator for a new bound value.

Version:
$Revision: 1.10 $ $Date: 2004/09/09 23:47:43 $
See Also:
BaseTable.getIndexedRows(org.axiondb.Selectable, boolean), Index, BindVariable

Constructor Summary
ChangingIndexedRowIterator(Index index, Table table, Function fn)
           
 
Method Summary
 String getShortName()
           
 boolean hasNext()
          Returns true if I have more Rows when traversing the list in the forward direction.
 boolean hasPrevious()
          Returns true if I have more Rows when traversing the list in the reverse direction.
 boolean indexSet()
           
 boolean isEmpty()
          Returns true if there are no rows to report with this iterator.
 void removeIndexKey()
           
 void reset()
          Re-initialize this RowIterator to its initial state (positioned just before the first Rowin the list).
 void setIndexKey(Object value)
           
 String toString()
           
 
Methods inherited from class org.axiondb.engine.rowiterators.DelegatingRowIterator
add, current, currentIndex, first, getDelegate, hasCurrent, last, next, nextIndex, peekNext, peekPrevious, previous, previousIndex, remove, set, setDelegate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.axiondb.RowIterator
add, current, currentIndex, first, hasCurrent, last, next, nextIndex, peekNext, peekPrevious, previous, previousIndex, remove, set
 

Constructor Detail

ChangingIndexedRowIterator

public ChangingIndexedRowIterator(Index index,
                                  Table table,
                                  Function fn)
                           throws AxionException
Method Detail

reset

public void reset()
           throws AxionException
Description copied from interface: RowIterator
Re-initialize this RowIterator to its initial state (positioned just before the first Rowin the list).

Specified by:
reset in interface RowIterator
Overrides:
reset in class DelegatingRowIterator
Throws:
AxionException

removeIndexKey

public void removeIndexKey()
                    throws AxionException
Specified by:
removeIndexKey in interface MutableIndexedRowIterator
Throws:
AxionException

isEmpty

public boolean isEmpty()
Description copied from interface: RowIterator
Returns true if there are no rows to report with this iterator.

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

setIndexKey

public void setIndexKey(Object value)
                 throws AxionException
Specified by:
setIndexKey in interface MutableIndexedRowIterator
Throws:
AxionException

indexSet

public boolean indexSet()
Specified by:
indexSet in interface MutableIndexedRowIterator

hasNext

public boolean hasNext()
Description copied from interface: RowIterator
Returns true if I have more Rows when traversing the list in the forward direction. (In other words, returns true iff RowIterator.next()would return a Rowrather than throwing an exception.)

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

hasPrevious

public boolean hasPrevious()
Description copied from interface: RowIterator
Returns true if I have more Rows when traversing the list in the reverse direction. (In other words, returns true iff RowIterator.previous()would return a Rowrather than throwing an exception.)

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

toString

public String toString()

getShortName

public String getShortName()