org.hibernate.engine
Class TransactionHelper

java.lang.Object
  extended by org.hibernate.engine.TransactionHelper
Direct Known Subclasses:
MultipleHiLoPerTableGenerator, TableGenerator, TableGenerator, TableStructure

public abstract class TransactionHelper
extends Object

Allows work to be done outside the current transaction, by suspending it, and performing work in a new transaction

Author:
Emmanuel Bernard

Constructor Summary
TransactionHelper()
           
 
Method Summary
protected abstract  Serializable doWorkInCurrentTransaction(Connection conn, String sql)
          The work to be done
 Serializable doWorkInNewTransaction(SessionImplementor session)
          Suspend the current transaction and perform work in a new transaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionHelper

public TransactionHelper()
Method Detail

doWorkInCurrentTransaction

protected abstract Serializable doWorkInCurrentTransaction(Connection conn,
                                                           String sql)
                                                    throws SQLException
The work to be done

Throws:
SQLException

doWorkInNewTransaction

public Serializable doWorkInNewTransaction(SessionImplementor session)
                                    throws HibernateException
Suspend the current transaction and perform work in a new transaction

Throws:
HibernateException


Copyright © 2009 Hibernate.org. All Rights Reserved.