Package com.jalios.jcms.db
Class ThrowableTransaction<R>
java.lang.Object
com.jalios.jcms.db.ThrowableTransaction<R>
- All Implemented Interfaces:
Transaction<R>
- Direct Known Subclasses:
LoggableThrowableTransaction
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(org.hibernate.Session session) Gets called byHibernateUtil.executeTransaction(Transaction)with an active Hibernate Session.abstract RexecuteTransaction(org.hibernate.Session session) boolean
-
Field Details
-
exception
-
-
Constructor Details
-
ThrowableTransaction
public ThrowableTransaction()
-
-
Method Details
-
getException
-
hasFailed
public boolean hasFailed() -
execute
Description copied from interface:TransactionGets called byHibernateUtil.executeTransaction(Transaction)with an active Hibernate Session. Does not need to care about activating or closing the Session, or handling transactions.Allows for returning a result object created within this method, i.e. a domain object or a collection of domain objects. A
TransactionExceptioncan be thrown when there is any Exception: It gets propagated to the caller of theHibernateUtil.executeTransaction(Transaction).- Specified by:
executein interfaceTransaction<R>- Parameters:
session- session passed by theHibernateUtil.executeTransaction(Transaction)- Returns:
- a result object returned by the action, or null
-
executeTransaction
- Throws:
Throwable
-