GigaSpaces XAP 10.0.1 API

org.openspaces.persistency.hibernate.iterator
Class DefaultChunkScrollableDataIterator

java.lang.Object
  extended by org.openspaces.persistency.hibernate.iterator.AbstractChunkDataIterator
      extended by org.openspaces.persistency.hibernate.iterator.DefaultChunkScrollableDataIterator
All Implemented Interfaces:
DataIterator, Iterator, MultiDataIterator

public class DefaultChunkScrollableDataIterator
extends AbstractChunkDataIterator

A default batch iterator that is based on DefaultScrollableDataIterator for each chunk.

Author:
kimchy

Field Summary
 
Fields inherited from class org.openspaces.persistency.hibernate.iterator.AbstractChunkDataIterator
chunkSize, entityName, fetchSize, hQuery, perfromOrderById, sessionFactory, sqlQuery
 
Constructor Summary
DefaultChunkScrollableDataIterator(SQLQuery sqlQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById, int chunkSize)
          Constructs a scrollable iterator over the given GigaSpaces SQLQuery.
DefaultChunkScrollableDataIterator(String entityName, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById, int chunkSize)
          Constructs a scrollable iterator over the given entity name.
DefaultChunkScrollableDataIterator(String hQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, int chunkSize)
          Constructs a scrollable iterator over the given hibernate query string.
 
Method Summary
protected  DataIterator createIteratorByEntityName(String entityName, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById, int from, int size)
           
protected  DataIterator createIteratorByHibernateQuery(String hQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, int from, int size)
           
protected  DataIterator createIteratorBySQLQuery(SQLQuery sqlQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById, int from, int size)
           
 
Methods inherited from class org.openspaces.persistency.hibernate.iterator.AbstractChunkDataIterator
close, hasNext, iterators, next, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultChunkScrollableDataIterator

public DefaultChunkScrollableDataIterator(String entityName,
                                          org.hibernate.SessionFactory sessionFactory,
                                          int fetchSize,
                                          boolean performOrderById,
                                          int chunkSize)
Constructs a scrollable iterator over the given entity name.

Parameters:
entityName - The entity name to scroll over
sessionFactory - The session factory to use to construct the session
fetchSize - The fetch size of the scrollabale result set
performOrderById - Should the query perform order by id or not
chunkSize - The size of the chunks the entity table will be broken to

DefaultChunkScrollableDataIterator

public DefaultChunkScrollableDataIterator(SQLQuery sqlQuery,
                                          org.hibernate.SessionFactory sessionFactory,
                                          int fetchSize,
                                          boolean performOrderById,
                                          int chunkSize)
Constructs a scrollable iterator over the given GigaSpaces SQLQuery.

Parameters:
sqlQuery - The SQLQuery to scroll over
sessionFactory - The session factory to use to construct the session
fetchSize - The fetch size of the scrollabale result set
performOrderById - Should the query perform order by id or not
chunkSize - The size of the chunks the entity table will be broken to

DefaultChunkScrollableDataIterator

public DefaultChunkScrollableDataIterator(String hQuery,
                                          org.hibernate.SessionFactory sessionFactory,
                                          int fetchSize,
                                          int chunkSize)
Constructs a scrollable iterator over the given hibernate query string.

Parameters:
hQuery - The hiberante query string to scroll over
sessionFactory - The session factory to use to construct the session
fetchSize - The fetch size of the scrollabale result set
chunkSize - The size of the chunks the entity table will be broken to
Method Detail

createIteratorByEntityName

protected DataIterator createIteratorByEntityName(String entityName,
                                                  org.hibernate.SessionFactory sessionFactory,
                                                  int fetchSize,
                                                  boolean performOrderById,
                                                  int from,
                                                  int size)
Specified by:
createIteratorByEntityName in class AbstractChunkDataIterator

createIteratorBySQLQuery

protected DataIterator createIteratorBySQLQuery(SQLQuery sqlQuery,
                                                org.hibernate.SessionFactory sessionFactory,
                                                int fetchSize,
                                                boolean performOrderById,
                                                int from,
                                                int size)
Specified by:
createIteratorBySQLQuery in class AbstractChunkDataIterator

createIteratorByHibernateQuery

protected DataIterator createIteratorByHibernateQuery(String hQuery,
                                                      org.hibernate.SessionFactory sessionFactory,
                                                      int fetchSize,
                                                      int from,
                                                      int size)
Specified by:
createIteratorByHibernateQuery in class AbstractChunkDataIterator

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.