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 org.apache.log4j.Logger logger
           
protected  org.hibernate.Session session
           
 
Constructor Summary
Hibernate3UnitOfWork(org.hibernate.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 org.apache.log4j.Logger logger

session

protected final org.hibernate.Session session
Constructor Detail

Hibernate3UnitOfWork

public Hibernate3UnitOfWork(org.hibernate.Session sess)
Method Detail

execute

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

Throws:
org.hibernate.HibernateException

doit

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

Throws:
org.hibernate.HibernateException