Package org.apache.ibatis.transaction
Interface Transaction
- All Known Implementing Classes:
JdbcTransaction
,ManagedTransaction
public interface Transaction
Wraps a database connection. Handles the connection lifecycle that comprises: its creation, preparation,
commit/rollback and close.
- Author:
- Clinton Begin
-
Method Details
-
getConnection
Retrieve inner database connection.- Returns:
- DataBase connection
- Throws:
SQLException
- the SQL exception
-
commit
Commit inner database connection.- Throws:
SQLException
- the SQL exception
-
rollback
Rollback inner database connection.- Throws:
SQLException
- the SQL exception
-
close
Close inner database connection.- Throws:
SQLException
- the SQL exception
-
getTimeout
Get transaction timeout if set.- Returns:
- the timeout
- Throws:
SQLException
- the SQL exception
-