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
public class DBReader.DBReaderForwardIterator
- extends DBReader.DBReaderIterator
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!
}
Method Summary |
boolean |
hasNext()
Implements the Iterator Interface. |
DBRecordData |
next()
Implements the Iterator Interface. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DBReader.DBReaderForwardIterator
public DBReader.DBReaderForwardIterator(int maxCount)
hasNext
public boolean hasNext()
- Implements the Iterator Interface.
- Returns:
- true if there is another record to read
next
public DBRecordData next()
- Implements the Iterator Interface.
- Returns:
- the current Record interface
Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.