Package org.apache.empire.db
Class DBReader.DBReaderForwardIterator
java.lang.Object
org.apache.empire.db.DBReader.DBReaderIterator
org.apache.empire.db.DBReader.DBReaderForwardIterator
- All Implemented Interfaces:
Iterator<DBRecordData>
- Enclosing class:
- DBReader
This is an iterator for forward only resultsets.
There is an important limitation on this iterator: After calling
hasNext() the caller may not use any functions on the current item any more. i.e.
Example:
while (i.hasNext())
{
DBRecordData r = i.next();
Object o = r.getValue(0); // ok
bool last = i.hasNext(); // ok
Object o = r.getValue(0); // Illegal call!
}
-
Field Summary
Fields inherited from class org.apache.empire.db.DBReader.DBReaderIterator
curCount, maxCount -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.empire.db.DBReader.DBReaderIterator
dispose, removeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
DBReaderForwardIterator
public DBReaderForwardIterator(int maxCount)
-
-
Method Details
-
hasNext
public boolean hasNext()Implements the Iterator Interface.- Returns:
- true if there is another record to read
-
next
Implements the Iterator Interface.- Returns:
- the current Record interface
-