Package org.apache.cayenne.access.jdbc
Class LimitResultIterator<T>
java.lang.Object
org.apache.cayenne.access.jdbc.LimitResultIterator<T>
- All Implemented Interfaces:
AutoCloseable,Iterable<T>,ResultIterator<T>
- Since:
- 3.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ResultIterator<T>protected intprotected intprotected booleanprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallRows()Returns all yet unread rows from ResultSet without closing it.voidclose()Closes ResultIterator and associated ResultSet.booleanReturns true if there is at least one more record that can be read from the iterator.iterator()nextRow()Returns the next result row that is, depending on the query, may be a scalar value, a DataRow, or an Object[] array containing a mix of scalars and DataRows.voidskipRow()Goes past current row.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
delegate
-
fetchLimit
protected int fetchLimit -
offset
protected int offset -
fetchedSoFar
protected int fetchedSoFar -
nextRow
protected boolean nextRow
-
-
Constructor Details
-
LimitResultIterator
-
-
Method Details
-
iterator
-
close
public void close()Description copied from interface:ResultIteratorCloses ResultIterator and associated ResultSet. This method must be called explicitly when the user is finished processing the records. Otherwise unused database resources will not be released properly.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceResultIterator<T>
-
allRows
Description copied from interface:ResultIteratorReturns all yet unread rows from ResultSet without closing it.- Specified by:
allRowsin interfaceResultIterator<T>- Since:
- 3.0
-
hasNextRow
public boolean hasNextRow()Description copied from interface:ResultIteratorReturns true if there is at least one more record that can be read from the iterator.- Specified by:
hasNextRowin interfaceResultIterator<T>
-
nextRow
Description copied from interface:ResultIteratorReturns the next result row that is, depending on the query, may be a scalar value, a DataRow, or an Object[] array containing a mix of scalars and DataRows.- Specified by:
nextRowin interfaceResultIterator<T>- Since:
- 3.0
-
skipRow
public void skipRow()Description copied from interface:ResultIteratorGoes past current row. If the row is not needed, this may save some time on data conversion.- Specified by:
skipRowin interfaceResultIterator<T>- Since:
- 3.0
-