GigaSpaces XAP 9.7.2 API

org.openspaces.persistency.hibernate.iterator
Class StatelessListQueryDataIterator

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

public class StatelessListQueryDataIterator
extends Object
implements DataIterator

A simple iterator that iterates over a SQLQuery by creating an Hiberante query using Hibernate StatelessSession and listing it.

Author:
kimchy

Field Summary
protected  com.gigaspaces.datasource.DataSourceSQLQuery dataSourceSQLQuery
           
protected  String entityName
           
protected  int from
           
protected  org.hibernate.StatelessSession session
           
protected  org.hibernate.SessionFactory sessionFactory
           
protected  int size
           
protected  SQLQuery<?> sqlQuery
           
 
Constructor Summary
StatelessListQueryDataIterator(com.gigaspaces.datasource.DataSourceSQLQuery dataSourceSQLQuery, org.hibernate.SessionFactory sessionFactory)
           
StatelessListQueryDataIterator(SQLQuery sqlQuery, org.hibernate.SessionFactory sessionFactory)
           
StatelessListQueryDataIterator(SQLQuery sqlQuery, org.hibernate.SessionFactory sessionFactory, int from, int size)
           
StatelessListQueryDataIterator(String entityName, org.hibernate.SessionFactory sessionFactory)
           
StatelessListQueryDataIterator(String entityName, org.hibernate.SessionFactory sessionFactory, int from, int size)
           
 
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  Iterator createIterator()
           
 boolean hasNext()
           
 Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entityName

protected final String entityName

sqlQuery

protected final SQLQuery<?> sqlQuery

dataSourceSQLQuery

protected final com.gigaspaces.datasource.DataSourceSQLQuery dataSourceSQLQuery

sessionFactory

protected final org.hibernate.SessionFactory sessionFactory

from

protected final int from

size

protected final int size

session

protected org.hibernate.StatelessSession session
Constructor Detail

StatelessListQueryDataIterator

public StatelessListQueryDataIterator(SQLQuery sqlQuery,
                                      org.hibernate.SessionFactory sessionFactory)

StatelessListQueryDataIterator

public StatelessListQueryDataIterator(SQLQuery sqlQuery,
                                      org.hibernate.SessionFactory sessionFactory,
                                      int from,
                                      int size)

StatelessListQueryDataIterator

public StatelessListQueryDataIterator(String entityName,
                                      org.hibernate.SessionFactory sessionFactory)

StatelessListQueryDataIterator

public StatelessListQueryDataIterator(String entityName,
                                      org.hibernate.SessionFactory sessionFactory,
                                      int from,
                                      int size)

StatelessListQueryDataIterator

public StatelessListQueryDataIterator(com.gigaspaces.datasource.DataSourceSQLQuery dataSourceSQLQuery,
                                      org.hibernate.SessionFactory sessionFactory)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public Object next()
Specified by:
next in interface Iterator

remove

public void remove()
Specified by:
remove in interface Iterator

close

public void close()
Description copied from interface: DataIterator
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.

Specified by:
close in interface DataIterator

createIterator

protected Iterator createIterator()

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.