org.springframework.orm.hibernate
Class ScrollHibernateCallback

java.lang.Object
  extended by org.springframework.orm.hibernate.ScrollHibernateCallback
All Implemented Interfaces:
org.springframework.orm.hibernate.HibernateCallback

public abstract class ScrollHibernateCallback
extends java.lang.Object
implements org.springframework.orm.hibernate.HibernateCallback


Field Summary
static int DEFAULT_FETCH_SIZE
           
 
Constructor Summary
ScrollHibernateCallback()
           
ScrollHibernateCallback(int fetchSize, net.sf.hibernate.ScrollMode scrollMode)
           
 
Method Summary
abstract  net.sf.hibernate.Query configureQuery(net.sf.hibernate.Session session)
          Create and configure query which will be used as a source for ScrollableResults
 java.lang.Long doInHibernate(net.sf.hibernate.Session session)
           
abstract  void nextScrollableResult(net.sf.hibernate.Session session, net.sf.hibernate.ScrollableResults data)
          Perform operation on the cursor row
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FETCH_SIZE

public static final int DEFAULT_FETCH_SIZE
See Also:
Constant Field Values
Constructor Detail

ScrollHibernateCallback

public ScrollHibernateCallback(int fetchSize,
                               net.sf.hibernate.ScrollMode scrollMode)

ScrollHibernateCallback

public ScrollHibernateCallback()
Method Detail

doInHibernate

public java.lang.Long doInHibernate(net.sf.hibernate.Session session)
                             throws net.sf.hibernate.HibernateException,
                                    java.sql.SQLException
Specified by:
doInHibernate in interface org.springframework.orm.hibernate.HibernateCallback
Throws:
net.sf.hibernate.HibernateException
java.sql.SQLException

configureQuery

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

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

nextScrollableResult

public abstract void nextScrollableResult(@NotNull
                                          net.sf.hibernate.Session session,
                                          @NotNull
                                          net.sf.hibernate.ScrollableResults data)
                                   throws net.sf.hibernate.HibernateException
Perform operation on the cursor row

Parameters:
session - Hibernate session object
data - cursor row
Throws:
net.sf.hibernate.HibernateException - when something went wrong


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.