GigaSpaces XAP 9.7.2 API

org.openspaces.persistency.hibernate.iterator
Class StatelessScrollableDataIterator

java.lang.Object
  extended by org.openspaces.persistency.hibernate.iterator.AbstractScrollableDataIterator
      extended by org.openspaces.persistency.hibernate.iterator.StatelessScrollableDataIterator
All Implemented Interfaces:
DataIterator, Iterator

public class StatelessScrollableDataIterator
extends AbstractScrollableDataIterator

A stateless scrollable result based on Hibernate StatelessSession.

Author:
kimchy

Field Summary
protected  org.hibernate.StatelessSession session
           
protected  org.hibernate.Transaction transaction
           
 
Fields inherited from class org.openspaces.persistency.hibernate.iterator.AbstractScrollableDataIterator
entityName, fetchSize, from, hQuery, perfromOrderById, sessionFactory, size, sqlQuery
 
Constructor Summary
StatelessScrollableDataIterator(SQLQuery sqlQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById)
          Constructs a scrollable iterator over the given GigaSpaces SQLQuery.
StatelessScrollableDataIterator(SQLQuery sqlQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById, int from, int size)
          Constructs a scrollable iterator over the given GigaSpaces SQLQuery.
StatelessScrollableDataIterator(String hQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize)
          Constructs a scrollable iterator over the given hibernate query string.
StatelessScrollableDataIterator(String entityName, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById)
          Constructs a scrollable iterator over the given entity name.
StatelessScrollableDataIterator(String entityName, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById, int from, int size)
          Constructs a scrollable iterator over the given entity name.
StatelessScrollableDataIterator(String hQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, int from, int size)
          Constructs a scrollable iterator over the given hibernate query string.
 
Method Summary
protected  void clear()
           
protected  org.hibernate.ScrollableResults createCursor()
           
protected  void doClose()
           
 
Methods inherited from class org.openspaces.persistency.hibernate.iterator.AbstractScrollableDataIterator
close, hasNext, next, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

session

protected org.hibernate.StatelessSession session

transaction

protected org.hibernate.Transaction transaction
Constructor Detail

StatelessScrollableDataIterator

public StatelessScrollableDataIterator(String entityName,
                                       org.hibernate.SessionFactory sessionFactory,
                                       int fetchSize,
                                       boolean performOrderById)
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

StatelessScrollableDataIterator

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

Parameters:
entityName - The entity name to scroll over
sessionFactory - The session factory to use to constrcut the session
fetchSize - The fetch size of the scrollable result set
performOrderById - Should the query perform order by id or not
from - The from index to scroll from
size - The size of data to scroll to

StatelessScrollableDataIterator

public StatelessScrollableDataIterator(SQLQuery sqlQuery,
                                       org.hibernate.SessionFactory sessionFactory,
                                       int fetchSize,
                                       boolean performOrderById)
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

StatelessScrollableDataIterator

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

Parameters:
sqlQuery - The SQLQuery to scroll over
sessionFactory - The session factory to use to constrcut the session
fetchSize - The fetch size of the scrollable result set
performOrderById - Should the query perform order by id or not
from - The from index to scroll from
size - The size of data to scroll to

StatelessScrollableDataIterator

public StatelessScrollableDataIterator(String hQuery,
                                       org.hibernate.SessionFactory sessionFactory,
                                       int fetchSize)
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

StatelessScrollableDataIterator

public StatelessScrollableDataIterator(String hQuery,
                                       org.hibernate.SessionFactory sessionFactory,
                                       int fetchSize,
                                       int from,
                                       int size)
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 constrcut the session
fetchSize - The fetch size of the scrollable result set
from - The from index to scroll from
size - The size of data to scroll to
Method Detail

doClose

protected void doClose()
Specified by:
doClose in class AbstractScrollableDataIterator

clear

protected void clear()
Specified by:
clear in class AbstractScrollableDataIterator

createCursor

protected org.hibernate.ScrollableResults createCursor()
Specified by:
createCursor in class AbstractScrollableDataIterator

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.