GigaSpaces - Open Spaces

org.openspaces.persistency.hibernate.iterator
Class StatelessChunkScrollableDataIterator

java.lang.Object
  extended by org.openspaces.persistency.hibernate.iterator.AbstractChunkScrollableDataIterator
      extended by org.openspaces.persistency.hibernate.iterator.StatelessChunkScrollableDataIterator
All Implemented Interfaces:
com.gigaspaces.datasource.DataIterator, Iterator, MultiDataIterator

public class StatelessChunkScrollableDataIterator
extends AbstractChunkScrollableDataIterator

A stateless batch iterator that is based on StatelessScrollableDataIterator for each chunk.

Author:
kimchy

Field Summary
 
Fields inherited from class org.openspaces.persistency.hibernate.iterator.AbstractChunkScrollableDataIterator
chunkSize, entityName, fetchSize, hQuery, perfromOrderById, sessionFactory, sqlQuery
 
Constructor Summary
StatelessChunkScrollableDataIterator(com.j_spaces.core.client.SQLQuery sqlQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById, int chunkSize)
          Constructs a scrollable iterator over the given GigaSpaces SQLQuery.
StatelessChunkScrollableDataIterator(String entityName, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById, int chunkSize)
          Constructs a scrollable iterator over the given entity name.
StatelessChunkScrollableDataIterator(String hQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, int chunkSize)
          Constructs a scrollable iterator over the given hibernate query string.
 
Method Summary
protected  com.gigaspaces.datasource.DataIterator createScrollableIteartorByEntityName(String entityName, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById, int from, int size)
           
protected  com.gigaspaces.datasource.DataIterator createScrollableIteartorByHibernateQuery(String hQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, int from, int size)
           
protected  com.gigaspaces.datasource.DataIterator createScrollableIteartorBySQLQuery(com.j_spaces.core.client.SQLQuery sqlQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById, int from, int size)
           
 
Methods inherited from class org.openspaces.persistency.hibernate.iterator.AbstractChunkScrollableDataIterator
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

StatelessChunkScrollableDataIterator

public StatelessChunkScrollableDataIterator(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

StatelessChunkScrollableDataIterator

public StatelessChunkScrollableDataIterator(com.j_spaces.core.client.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

StatelessChunkScrollableDataIterator

public StatelessChunkScrollableDataIterator(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

createScrollableIteartorByEntityName

protected com.gigaspaces.datasource.DataIterator createScrollableIteartorByEntityName(String entityName,
                                                                                      org.hibernate.SessionFactory sessionFactory,
                                                                                      int fetchSize,
                                                                                      boolean performOrderById,
                                                                                      int from,
                                                                                      int size)
Specified by:
createScrollableIteartorByEntityName in class AbstractChunkScrollableDataIterator

createScrollableIteartorBySQLQuery

protected com.gigaspaces.datasource.DataIterator createScrollableIteartorBySQLQuery(com.j_spaces.core.client.SQLQuery sqlQuery,
                                                                                    org.hibernate.SessionFactory sessionFactory,
                                                                                    int fetchSize,
                                                                                    boolean performOrderById,
                                                                                    int from,
                                                                                    int size)
Specified by:
createScrollableIteartorBySQLQuery in class AbstractChunkScrollableDataIterator

createScrollableIteartorByHibernateQuery

protected com.gigaspaces.datasource.DataIterator createScrollableIteartorByHibernateQuery(String hQuery,
                                                                                          org.hibernate.SessionFactory sessionFactory,
                                                                                          int fetchSize,
                                                                                          int from,
                                                                                          int size)
Specified by:
createScrollableIteartorByHibernateQuery in class AbstractChunkScrollableDataIterator

GigaSpaces - Open Spaces

Copyright © GigaSpaces.