cn.khthink.easyapi.kit.database.Easybatis Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of EasyApi Show documentation
Show all versions of EasyApi Show documentation
A RESTFUL Framework for JavaWeb
The newest version!
package cn.khthink.easyapi.kit.database;
import org.apache.ibatis.session.SqlSession;
/**
* mybatis组件
*
* @author kh
*/
public interface Easybatis {
/**
* 获取sqlsession
*
* @return SqlSession
*/
SqlSession getSqlSession();
/**
* 获取sqlsession
*
* @param isAutoCommit 是否自动提交事务
* @return SqlSession
*/
SqlSession getSqlSession(boolean isAutoCommit);
/**
* 获取mapper
*
* @param type 类型
* @param 泛型
* @return T
*/
T getMapper(Class type);
/**
* 提交事务
*/
void commitSqlSession();
/**
* 关闭会话并提交事务
*/
void closeSqlSession();
}