Package org.apache.ibatis.transaction
Interface Transaction
- 
- All Known Implementing Classes:
- JdbcTransaction,- ManagedTransaction
 
 public interface TransactionWraps a database connection. Handles the connection lifecycle that comprises: its creation, preparation, commit/rollback and close.- Author:
- Clinton Begin
 
- 
- 
Method SummaryModifier and Type Method Description voidclose()Close inner database connection.voidcommit()Commit inner database connection.java.sql.ConnectiongetConnection()Retrieve inner database connection.java.lang.IntegergetTimeout()Get transaction timeout if set.voidrollback()Rollback inner database connection.
 
- 
- 
- 
Method Detail- 
getConnectionjava.sql.Connection getConnection() throws java.sql.SQLExceptionRetrieve inner database connection.- Returns:
- DataBase connection
- Throws:
- java.sql.SQLException
 
 - 
commitvoid commit() throws java.sql.SQLExceptionCommit inner database connection.- Throws:
- java.sql.SQLException
 
 - 
rollbackvoid rollback() throws java.sql.SQLExceptionRollback inner database connection.- Throws:
- java.sql.SQLException
 
 - 
closevoid close() throws java.sql.SQLExceptionClose inner database connection.- Throws:
- java.sql.SQLException
 
 - 
getTimeoutjava.lang.Integer getTimeout() throws java.sql.SQLExceptionGet transaction timeout if set.- Throws:
- java.sql.SQLException
 
 
- 
 
-