org.apache.ojb.broker.accesslayer
Interface OJBIterator

All Superinterfaces:
java.util.Iterator
All Known Implementing Classes:
ChainingIterator, PagingIterator, RsIterator

public interface OJBIterator
extends java.util.Iterator

Version:
$Id: OJBIterator.java,v 1.6 2003/12/17 20:37:02 brj Exp $

Method Summary
 boolean absolute(int row)
          Moves the cursor to the given row number in the iterator.
 int fullSize()
           
 boolean relative(int row)
          Moves the cursor a relative number of rows, either positive or negative.
 void releaseDbResources()
          Release all internally used Database resources of the iterator.
 int size()
           
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Method Detail

size

public int size()
         throws PersistenceBrokerException
Returns:
the size of the iterator, aka the number of rows in this iterator.
Throws:
PersistenceBrokerException

fullSize

public int fullSize()
             throws PersistenceBrokerException
Returns:
the unlimited size of the iterator, fullSize() may differ from size() for PagingIterator
Throws:
PersistenceBrokerException

absolute

public boolean absolute(int row)
                 throws PersistenceBrokerException
Moves the cursor to the given row number in the iterator. If the row number is positive, the cursor moves to the given row number with respect to the beginning of the iterator. The first row is row 1, the second is row 2, and so on.

Parameters:
row - the row to move to in this iterator, by absolute number
Throws:
PersistenceBrokerException

relative

public boolean relative(int row)
                 throws PersistenceBrokerException
Moves the cursor a relative number of rows, either positive or negative. Attempting to move beyond the first/last row in the iterator positions the cursor before/after the the first/last row. Calling relative(0) is valid, but does not change the cursor position.

Parameters:
row - the row to move to in this iterator, by relative number
Throws:
PersistenceBrokerException

releaseDbResources

public void releaseDbResources()
Release all internally used Database resources of the iterator. Clients must call this methods explicitely if the iterator is not exhausted by the client application. If the Iterator is exhauseted this method will be called implicitely.



Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14