org.apache.cayenne.access.jdbc
Class LimitResultIterator
java.lang.Object
org.apache.cayenne.access.jdbc.LimitResultIterator
- All Implemented Interfaces:
- ResultIterator
public class LimitResultIterator
- extends java.lang.Object
- implements ResultIterator
- Since:
- 3.0
Method Summary |
java.util.List<?> |
allRows()
Returns all yet unread rows from ResultSet without closing it. |
void |
close()
Closes ResultIterator and associated ResultSet. |
boolean |
hasNextRow()
Returns true if there is at least one more record that can be read from the
iterator. |
java.lang.Object |
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. |
void |
skipRow()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
wrappedIterator
protected ResultIterator wrappedIterator
nextDataObjectIds
protected java.util.Map<java.lang.String,java.lang.Object> nextDataObjectIds
fetchLimit
protected int fetchLimit
offset
protected int offset
fetchedSoFar
protected int fetchedSoFar
nextRow
protected boolean nextRow
LimitResultIterator
public LimitResultIterator(ResultIterator wrappedIterator,
int offset,
int fetchLimit)
throws CayenneException
- Throws:
CayenneException
close
public void close()
throws CayenneException
- Description copied from interface:
ResultIterator
- Closes 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:
close
in interface ResultIterator
- Throws:
CayenneException
allRows
public java.util.List<?> allRows()
throws CayenneException
- Description copied from interface:
ResultIterator
- Returns all yet unread rows from ResultSet without closing it.
- Specified by:
allRows
in interface ResultIterator
- Throws:
CayenneException
- Since:
- 3.0
hasNextRow
public boolean hasNextRow()
throws CayenneException
- Description copied from interface:
ResultIterator
- Returns true if there is at least one more record that can be read from the
iterator.
- Specified by:
hasNextRow
in interface ResultIterator
- Throws:
CayenneException
nextRow
public java.lang.Object nextRow()
throws CayenneException
- Description copied from interface:
ResultIterator
- 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.
- Specified by:
nextRow
in interface ResultIterator
- Throws:
CayenneException
- Since:
- 3.0
skipRow
public void skipRow()
throws CayenneException
- Specified by:
skipRow
in interface ResultIterator
- Throws:
CayenneException
- Since:
- 3.0
Copyright © 2001-2012 Apache Cayenne. All Rights Reserved.