Class HibernateTransaction
java.lang.Object
com.peterphi.std.guice.hibernate.module.HibernateTransaction
- All Implemented Interfaces:
AutoCloseable
-
Constructor Details
-
HibernateTransaction
public HibernateTransaction(org.hibernate.Transaction tx)
-
-
Method Details
-
withAutoRollback
Set the automatic close action to rollback (rather than commit)- Returns:
-
withAutoCommit
Set the automatic close action to commit (rather than rollback)- Returns:
-
commit
public void commit() -
rollback
public void rollback() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-