Package com.helixframework.db.tx
Class AutoRollback
java.lang.Object
com.helixframework.db.tx.AutoRollback
- All Implemented Interfaces:
AutoCloseable
AutoCloseable that automatically rolls back the database transaction in the event
that it was not committed.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AutoRollback
Creates a new instance ofAutoRollback.- Parameters:
conn- db connection
-
-
Method Details
-
commit
Commits the current transaction.- Throws:
SQLException- if the transaction cannot be committed
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
SQLException
-