站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 3.2.4 正式版 API 英文文档

TransactionHelper (Hibernate API Documentation) - Hibernate 3.2.4 正式版 API 英文文档


org.hibernate.engine
Class TransactionHelper

java.lang.Object
  extended byorg.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