本文共 957 字,大约阅读时间需要 3 分钟。
- ORM框架
package org.apache.ibatis.transaction;import java.sql.Connection;import java.sql.SQLException;/** * Wraps a database connection. * Handles the connection lifecycle that comprises: its creation, * preparation, commit/rollback and close. * @author Clinton Begin */public interface Transaction { /** * Retrieve inner database connection * @return DataBase connection * @throws SQLException */ Connection getConnection() throws SQLException; /** * Commit inner database connection. * @throws SQLException */ void commit() throws SQLException; /** * Rollback inner database connection. * @throws SQLException */ void rollback() throws SQLException; /** * Close inner database connection. * @throws SQLException */ void close() throws SQLException; /** * Get transaction timeout if set * @throws SQLException */ Integer getTimeout() throws SQLException;}
转载地址:http://mnvli.baihongyu.com/