Package net.sf.basedb.core
Class ScrollIterator<E>
java.lang.Object
net.sf.basedb.core.ScrollIterator<E>
- All Implemented Interfaces:
AutoCloseable
,Iterator<E>
This is an iterator view of the result from a query
using the Hibernate
ScrollableResults
object.- Version:
- 2.0
- Author:
- Nicklas
- Last modified
- $Date: 2021-05-07 13:44:50 +0200 (Fri, 07 May 2021) $
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private E
private final ScrollableResults
private final boolean
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
results
-
returnArray
private final boolean returnArray -
isClosed
private boolean isClosed -
nextElement
-
-
Constructor Details
-
ScrollIterator
ScrollIterator(ScrollableResults results, boolean returnArray)
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove()Not supported.- Specified by:
remove
in interfaceIterator<E>
- Throws:
UnsupportedOperationException
- Always
-
close
public void close()Close the results and return resources.- Specified by:
close
in interfaceAutoCloseable
-
isClosed
public boolean isClosed()Check if the results has been closed.
-