com.jquicker.persistent.rdb.tx.TransactionAspect Maven / Gradle / Ivy
package com.jquicker.persistent.rdb.tx;
import java.lang.reflect.Method;
import java.sql.SQLException;
/**
* @author OL
*/
public interface TransactionAspect {
/**
* 开启事务
* @throws SQLException
* @author OL
*/
void start() throws SQLException;
/**
* 是否已开启事务
* @return
* @author OL
*/
public boolean isOpen();
/**
* 提交事务
* @throws SQLException
* @author OL
*/
void commit() throws SQLException;
/**
* 回滚事务
* @param throwable
* @throws SQLException
* @author OL
*/
void rollback(Method method, Throwable throwable) throws SQLException;
/**
* 关闭连接
* @throws SQLException
* @author OL
*/
void close() throws SQLException;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy