public abstract class AbstractChunkDataIterator extends Object implements MultiDataIterator
Modifier and Type | Field and Description |
---|---|
protected int |
chunkSize |
protected String |
entityName |
protected int |
fetchSize |
protected String |
hQuery |
protected boolean |
perfromOrderById |
protected org.hibernate.SessionFactory |
sessionFactory |
protected SQLQuery |
sqlQuery |
Constructor and Description |
---|
AbstractChunkDataIterator(SQLQuery sqlQuery,
org.hibernate.SessionFactory sessionFactory,
int fetchSize,
boolean performOrderById,
int chunkSize)
Constructs a scrollable iterator over the given GigaSpaces
SQLQuery . |
AbstractChunkDataIterator(String entityName,
org.hibernate.SessionFactory sessionFactory,
int fetchSize,
boolean performOrderById,
int chunkSize)
Constructs a scrollable iterator over the given entity name.
|
AbstractChunkDataIterator(String hQuery,
org.hibernate.SessionFactory sessionFactory,
int fetchSize,
int chunkSize)
Constructs a scrollable iterator over the given hibernate query string.
|
Modifier and Type | Method and Description |
---|---|
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 DataIterator |
createIteratorByEntityName(String entityName,
org.hibernate.SessionFactory sessionFactory,
int fetchSize,
boolean performOrderById,
int from,
int size) |
protected abstract DataIterator |
createIteratorByHibernateQuery(String hQuery,
org.hibernate.SessionFactory sessionFactory,
int fetchSize,
int from,
int size) |
protected abstract DataIterator |
createIteratorBySQLQuery(SQLQuery sqlQuery,
org.hibernate.SessionFactory sessionFactory,
int fetchSize,
boolean performOrderById,
int from,
int size) |
boolean |
hasNext() |
DataIterator[] |
iterators()
Returns the underlying iterators.
|
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 chunkSize
public AbstractChunkDataIterator(String entityName, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById, int chunkSize)
entityName
- The entity name 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 notchunkSize
- The size of the chunks the entity table will be broken topublic AbstractChunkDataIterator(SQLQuery sqlQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById, int chunkSize)
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 notchunkSize
- The size of the chunks the entity table will be broken topublic AbstractChunkDataIterator(String hQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, int chunkSize)
hQuery
- The hiberante query string to scroll oversessionFactory
- The session factory to use to construct the sessionfetchSize
- The fetch size of the scrollabale result setchunkSize
- The size of the chunks the entity table will be broken topublic DataIterator[] iterators()
MultiDataIterator
iterators
in interface MultiDataIterator
public void close()
DataIterator
close
in interface DataIterator
protected abstract DataIterator createIteratorByEntityName(String entityName, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById, int from, int size)
protected abstract DataIterator createIteratorBySQLQuery(SQLQuery sqlQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById, int from, int size)
protected abstract DataIterator createIteratorByHibernateQuery(String hQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, int from, int size)
Copyright © GigaSpaces.