public class MapperBuilder extends Object
| Constructor and Description |
|---|
MapperBuilder()
默认构造方法
|
MapperBuilder(Properties properties) |
| Modifier and Type | Method and Description |
|---|---|
Config |
getConfig()
获取通用Mapper配置
|
void |
ifEmptyRegisterDefaultInterface()
如果当前注册的接口为空,自动注册默认接口
|
boolean |
isExtendCommonMapper(Class<?> mapperInterface)
判断接口是否包含通用接口
|
boolean |
isMapperMethod(String msId)
判断当前的接口方法是否需要进行拦截
|
void |
processConfiguration(org.apache.ibatis.session.Configuration configuration)
配置完成后,执行下面的操作
处理configuration中全部的MappedStatement
|
void |
processConfiguration(org.apache.ibatis.session.Configuration configuration,
Class<?> mapperInterface)
配置指定的接口
|
void |
registerMapper(Class<?> mapperClass)
注册通用Mapper接口
|
void |
registerMapper(String mapperClass)
注册通用Mapper接口
|
void |
setConfig(Config config)
设置通用Mapper配置
|
void |
setProperties(Properties properties)
配置属性
|
void |
setSqlSource(org.apache.ibatis.mapping.MappedStatement ms)
重新设置SqlSource
执行该方法前必须使用isMapperMethod判断,否则msIdCache会空
|
public MapperBuilder()
public MapperBuilder(Properties properties)
public void registerMapper(Class<?> mapperClass)
mapperClass - 对象public void registerMapper(String mapperClass)
mapperClass - 对象public boolean isMapperMethod(String msId)
msId - 方法idpublic boolean isExtendCommonMapper(Class<?> mapperInterface)
mapperInterface - 接口public void ifEmptyRegisterDefaultInterface()
public void processConfiguration(org.apache.ibatis.session.Configuration configuration)
configuration - 配置public void processConfiguration(org.apache.ibatis.session.Configuration configuration,
Class<?> mapperInterface)
configuration - 配置mapperInterface - 接口public Config getConfig()
public void setConfig(Config config)
config - 配置信息public void setProperties(Properties properties)
properties - 属性public void setSqlSource(org.apache.ibatis.mapping.MappedStatement ms)
ms - MappedStatementCopyright © 2020. All rights reserved.