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 java.lang.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  java.io.Serializable doWorkInCurrentTransaction(java.sql.Connection conn, java.lang.String sql)
          The work to be done
 java.io.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 java.io.Serializable doWorkInCurrentTransaction(java.sql.Connection conn,
                                                                   java.lang.String sql)
                                                            throws java.sql.SQLException
The work to be done

Throws:
java.sql.SQLException

doWorkInNewTransaction

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

Throws:
HibernateException


Copyright © 2008 Hibernate.org. All Rights Reserved.