net.sf.beanlib.hibernate3
Class Hibernate3UnitOfWork

java.lang.Object
  extended by net.sf.beanlib.hibernate3.Hibernate3UnitOfWork

public abstract class Hibernate3UnitOfWork
extends Object

Hibernate 3 Unit Of Work. A Hibernate Unit-Of-Work means a unit of work that executes within a single atomic Hibernate transaction that either commits or roll backs upon returning from the execution.

Author:
Joe D. Velopar

Field Summary
private static Log logger
           
protected  Session session
           
 
Constructor Summary
Hibernate3UnitOfWork(Session sess)
           
 
Method Summary
protected abstract  void doit()
          Method that a subclass overrides to provide the actual work to be done within a Hibernate transaction.
 void execute()
          Executes a unit of work within a Hibernate transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final Log logger

session

protected final Session session
Constructor Detail

Hibernate3UnitOfWork

public Hibernate3UnitOfWork(Session sess)
Method Detail

execute

public final void execute()
                   throws HibernateException
Executes a unit of work within a Hibernate transaction.

Throws:
HibernateException

doit

protected abstract void doit()
                      throws HibernateException
Method that a subclass overrides to provide the actual work to be done within a Hibernate transaction.

Throws:
HibernateException