org.springframework.orm.hibernate
Class IteratorHibernateCallback<T>

java.lang.Object
  extended by org.springframework.orm.hibernate.IteratorHibernateCallback<T>
All Implemented Interfaces:
org.springframework.orm.hibernate3.HibernateCallback<Integer>

public abstract class IteratorHibernateCallback<T>
extends Object
implements org.springframework.orm.hibernate3.HibernateCallback<Integer>


Constructor Summary
protected IteratorHibernateCallback(int fetchSize)
           
 
Method Summary
abstract  org.hibernate.Query configureQuery(org.hibernate.Session session)
          Create and configure query which will be used as a source for iteration
 Integer doInHibernate(org.hibernate.Session session)
           
abstract  void nextResultItem(org.hibernate.Session session, T item, int count)
          Perform operation on the cursor row
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IteratorHibernateCallback

protected IteratorHibernateCallback(int fetchSize)
Method Detail

doInHibernate

public Integer doInHibernate(org.hibernate.Session session)
                      throws org.hibernate.HibernateException,
                             SQLException
Specified by:
doInHibernate in interface org.springframework.orm.hibernate3.HibernateCallback<Integer>
Throws:
org.hibernate.HibernateException
SQLException

configureQuery

@NotNull
public abstract org.hibernate.Query configureQuery(@NotNull
                                                           org.hibernate.Session session)
                                            throws org.hibernate.HibernateException
Create and configure query which will be used as a source for iteration

Parameters:
session - Hibernate session object
Returns:
Hibernate Query object
Throws:
org.hibernate.HibernateException - when something went wrong

nextResultItem

public abstract void nextResultItem(@NotNull
                                    org.hibernate.Session session,
                                    @NotNull
                                    T item,
                                    int count)
                             throws org.hibernate.HibernateException
Perform operation on the cursor row

Parameters:
session - Hibernate session object
item - cursor row
Throws:
org.hibernate.HibernateException - when something went wrong


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.