All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.schoolwow.quickdao.module.database.transaction.kit.TransactionOperation Maven / Gradle / Ivy

There is a newer version: 5.3.1
Show newest version
package cn.schoolwow.quickdao.module.database.transaction.kit;

import java.io.Closeable;
import java.sql.Connection;
import java.sql.Savepoint;

/**
 * 事务相关操作
 */
public interface TransactionOperation extends Closeable {
    /**
     * 获取事务连接
     * */
    Connection getTransactionConnection();

    /**
     * 设置事务隔离级别
     *
     * @param transactionIsolation 指定事务级别,数值为Connection接口下的常量
     */
    void setTransactionIsolation(int transactionIsolation);

    /**
     * 设置保存点
     */
    Savepoint setSavePoint();

    /**
     * 设置保存点
     */
    Savepoint setSavePoint(String name);

    /**
     * 事务回滚
     */
    void rollback();

    /**
     * 事务回滚
     */
    void rollback(Savepoint savePoint);

    /**
     * 事务提交
     */
    void commit();

    /**
     * 关闭
     */
    @Override
    void close();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy