Class IteratorHibernateCallback<T>

java.lang.Object
com.atlassian.bamboo.hibernate.callbacks.IteratorHibernateCallback<T>
All Implemented Interfaces:
org.springframework.orm.hibernate5.HibernateCallback<Integer>

public abstract class IteratorHibernateCallback<T> extends Object implements org.springframework.orm.hibernate5.HibernateCallback<Integer>
  • Constructor Details

    • IteratorHibernateCallback

      protected IteratorHibernateCallback(int fetchSize)
  • Method Details

    • doInHibernate

      public Integer doInHibernate(org.hibernate.Session session) throws org.hibernate.HibernateException
      Specified by:
      doInHibernate in interface org.springframework.orm.hibernate5.HibernateCallback<T>
      Throws:
      org.hibernate.HibernateException
    • configureQuery

      @NotNull public abstract @NotNull org.hibernate.query.Query configureQuery(@NotNull @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 @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