|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Object | +--org.j2ee.dao.DAOHibernateActionProcessorImpl
Based on an example of book Code Notes for J2EE, Edited by GREGORY BRILL,
e-ISBN 0-679-64727-9
Last modified $Date: 2004/05/18 10:50:12 $
| Constructor Summary | |
|---|---|
DAOHibernateActionProcessorImpl()
|
|
| Method Summary | |
|---|---|
void |
addClass(java.lang.Class clazz)
A wrapped method for Hibernate addClass(Class persistenClass) but without throwing the MappingException. |
void |
beginTransaction()
Start a new Hibernate transaction. |
void |
closeSession()
close a started session |
void |
commitTransaction()
commit a started transaction. |
static net.sf.hibernate.cfg.Configuration |
getConfiguration()
|
java.sql.Connection |
getConnection()
Provides the JDBC connection object stored into the private instance |
org.j2ee.dao.errors.ErrorMapper |
getErrorMapper()
Return an ErrorMapper object to translate SQLException or other kind of exception to a common error list code |
void |
getSession()
get/start an Hibernate Session object to be used for external controled action. |
static net.sf.hibernate.SessionFactory |
getSessionFactory()
|
void |
process(org.j2ee.dao.DAOAction acmd)
execute a command action. |
void |
rollbackTransaction()
rollback a started transaction. |
void |
setConnection(java.sql.Connection connection)
Provide an external JDBC Connection to be used by Hibernate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DAOHibernateActionProcessorImpl()
| Method Detail |
public static net.sf.hibernate.cfg.Configuration getConfiguration()
throws net.sf.hibernate.HibernateException
net.sf.hibernate.HibernateException
public static net.sf.hibernate.SessionFactory getSessionFactory()
throws net.sf.hibernate.HibernateException
net.sf.hibernate.HibernateExceptionpublic void addClass(java.lang.Class clazz)
clazz - public org.j2ee.dao.errors.ErrorMapper getErrorMapper()
getErrorMapper in interface DAOActionProcessorpublic java.sql.Connection getConnection()
getConnection in interface DAOActionProcessorpublic void setConnection(java.sql.Connection connection)
setConnection in interface DAOActionProcessorconnection -
public void getSession()
throws DAOException
getSession in interface DAOActionProcessornet.sf.hibernate.HibernateException - if there are errors open the session
DAOException - if there are errors open the session
public void beginTransaction()
throws DAOException
beginTransaction in interface DAOActionProcessornet.sf.hibernate.HibernateException
DAOException
public void commitTransaction()
throws DAOException
commitTransaction in interface DAOActionProcessornet.sf.hibernate.HibernateException
DAOException
public void rollbackTransaction()
throws DAOException
rollbackTransaction in interface DAOActionProcessornet.sf.hibernate.HibernateException
DAOException
public void closeSession()
throws DAOException
closeSession in interface DAOActionProcessornet.sf.hibernate.HibernateException
DAOException
public void process(org.j2ee.dao.DAOAction acmd)
throws DAOException
process in interface DAOActionProcessoracmd -
DAOException
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||