Package net.sf.basedb.core
Class ScrollIterator<E>
- java.lang.Object
-
- net.sf.basedb.core.ScrollIterator<E>
-
- All Implemented Interfaces:
AutoCloseable
,Iterator<E>
class ScrollIterator<E> extends Object implements Iterator<E>, AutoCloseable
This is an iterator view of the result from a query using the HibernateScrollableResults
object.- Version:
- 2.0
- Author:
- Nicklas
- Last modified
- $Date: 2018-12-12 15:41:10 +0100 (on, 12 dec 2018) $
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
isClosed
private E
nextElement
private org.hibernate.ScrollableResults
results
-
Constructor Summary
Constructors Constructor Description ScrollIterator(org.hibernate.ScrollableResults results)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close the results and return resources.boolean
hasNext()
boolean
isClosed()
Check if the results has been closed.E
next()
void
remove()
Not supported.-
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 Detail
-
results
private final org.hibernate.ScrollableResults results
-
isClosed
private boolean isClosed
-
nextElement
private E nextElement
-
-
Method Detail
-
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.
-
-