org.apache.empire.db
Class DBReader.DBReaderForwardIterator

java.lang.Object
  extended by org.apache.empire.db.DBReader.DBReaderIterator
      extended by 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! }


Field Summary
 
Fields inherited from class org.apache.empire.db.DBReader.DBReaderIterator
curCount, maxCount
 
Constructor Summary
DBReader.DBReaderForwardIterator(int maxCount)
           
 
Method Summary
 boolean hasNext()
          Implements the Iterator Interface.
 DBRecordData next()
          Implements the Iterator Interface.
 
Methods inherited from class org.apache.empire.db.DBReader.DBReaderIterator
dispose, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBReader.DBReaderForwardIterator

public DBReader.DBReaderForwardIterator(int maxCount)
Method Detail

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–2014 Apache Software Foundation. All rights reserved.