|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openspaces.persistency.hibernate.iterator.AbstractChunkDataIterator
public abstract class AbstractChunkDataIterator
A base class that accepts a batch size and will create several iterators on the given entity by chunking it into batch size chuncks, each iterator will iterate only on the given chunk.
Field Summary | |
---|---|
protected int |
chunkSize
|
protected String |
entityName
|
protected int |
fetchSize
|
protected String |
hQuery
|
protected boolean |
perfromOrderById
|
protected org.hibernate.SessionFactory |
sessionFactory
|
protected SQLQuery |
sqlQuery
|
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
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 toMethod Detail |
---|
public DataIterator[] iterators()
MultiDataIterator
iterators
in interface MultiDataIterator
public boolean hasNext()
hasNext
in interface Iterator
public Object next()
next
in interface Iterator
public void remove()
remove
in interface Iterator
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)
|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |