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

cn.sylinx.hbatis.db.common.ITransaction Maven / Gradle / Ivy

The newest version!
package cn.sylinx.hbatis.db.common;

import java.sql.SQLException;

import cn.sylinx.hbatis.kit.Ret;
import cn.sylinx.hbatis.plugin.transaction.TransactionIsolationWrapper;

/**
 * 事务处理
 * 
 * @author han
 *
 */
public interface ITransaction {

	/**
	 * 事务执行
	 * 
	 * @return boolean
	 * @throws SQLException
	 *             sql异常
	 */
	Ret run() throws SQLException;

	/**
	 * 事务类型
	 * 
	 * @return
	 */
	default Integer transactionIsolation() {
		return TransactionIsolationWrapper.ME.getTransactionIsolation();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy