public abstract class AbstractScrollableDataIterator extends Object implements DataIterator
ScrollableResults
created based on either an
entity name or a SQLQuery
. Also allows for a "from" and "size" to be provided, in
this case, it will iterate from the given index till "size" results.Modifier and Type | Field and Description |
---|---|
protected String |
entityName |
protected int |
fetchSize |
protected int |
from |
protected String |
hQuery |
protected boolean |
perfromOrderById |
protected org.hibernate.SessionFactory |
sessionFactory |
protected int |
size |
protected SQLQuery |
sqlQuery |
Constructor and Description |
---|
AbstractScrollableDataIterator(SQLQuery sqlQuery,
org.hibernate.SessionFactory sessionFactory,
int fetchSize,
boolean performOrderById)
Constructs a scrollable iterator over the given GigaSpaces
SQLQuery . |
AbstractScrollableDataIterator(SQLQuery sqlQuery,
org.hibernate.SessionFactory sessionFactory,
int fetchSize,
boolean performOrderById,
int from,
int size)
Constructs a scrollable iterator over the given GigaSpaces
SQLQuery . |
AbstractScrollableDataIterator(String hQuery,
org.hibernate.SessionFactory sessionFactory,
int fetchSize)
Constructs a scrollable iterator over the given hibernate query string.
|
AbstractScrollableDataIterator(String entityName,
org.hibernate.SessionFactory sessionFactory,
int fetchSize,
boolean performOrderById)
Constructs a scrollable iterator over the given entity name.
|
AbstractScrollableDataIterator(String entityName,
org.hibernate.SessionFactory sessionFactory,
int fetchSize,
boolean performOrderById,
int from,
int size)
Constructs a scrollable iterator over the given entity name.
|
AbstractScrollableDataIterator(String hQuery,
org.hibernate.SessionFactory sessionFactory,
int fetchSize,
int from,
int size)
Constructs a scrollable iterator over the given hibernate query string.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
clear() |
void |
close()
Clean up after any resources associated with this iterator The iterator can be closed even if
the iterator wasn't iterated over all of its elements.
|
protected abstract org.hibernate.ScrollableResults |
createCursor() |
protected abstract void |
doClose() |
boolean |
hasNext() |
Object |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
protected final String entityName
protected final SQLQuery sqlQuery
protected final String hQuery
protected final org.hibernate.SessionFactory sessionFactory
protected final boolean perfromOrderById
protected final int fetchSize
protected final int from
protected final int size
public AbstractScrollableDataIterator(String entityName, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById)
entityName
- The entity name to scroll oversessionFactory
- The session factory to use to construct the sessionfetchSize
- The fetch size of the scrollabale result setperformOrderById
- Should the query perform order by id or notpublic AbstractScrollableDataIterator(String entityName, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById, int from, int size)
entityName
- The entity name to scroll oversessionFactory
- The session factory to use to constrcut the sessionfetchSize
- The fetch size of the scrollable result setperformOrderById
- Should the query perform order by id or notfrom
- The from index to scroll fromsize
- The size of data to scroll topublic AbstractScrollableDataIterator(String hQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize)
hQuery
- The hiberante query string to scroll oversessionFactory
- The session factory to use to construct the sessionfetchSize
- The fetch size of the scrollable result setpublic AbstractScrollableDataIterator(String hQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, int from, int size)
hQuery
- The hiberante query string to scroll oversessionFactory
- The session factory to use to construct the sessionfetchSize
- The fetch size of the scrollable result setfrom
- The from index to scroll fromsize
- The size of data to scroll topublic AbstractScrollableDataIterator(SQLQuery sqlQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById)
SQLQuery
.sqlQuery
- The SQLQuery
to scroll oversessionFactory
- The session factory to use to construct the sessionfetchSize
- The fetch size of the scrollabale result setperformOrderById
- Should the query perform order by id or notpublic AbstractScrollableDataIterator(SQLQuery sqlQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById, int from, int size)
SQLQuery
.sqlQuery
- The SQLQuery
to scroll oversessionFactory
- The session factory to use to construct the sessionfetchSize
- The fetch size of the scrollable result setperformOrderById
- Should the query perform order by id or notfrom
- The from index to scroll fromsize
- The size of data to scroll topublic void close()
DataIterator
close
in interface DataIterator
protected abstract void doClose()
protected abstract void clear()
protected abstract org.hibernate.ScrollableResults createCursor()
Copyright © GigaSpaces.