public class MapperHelper extends Object
| 构造器和说明 |
|---|
MapperHelper()
默认构造方法
|
MapperHelper(Properties properties)
带配置的构造方法
|
| 限定符和类型 | 方法和说明 |
|---|---|
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 MapperHelper()
public MapperHelper(Properties properties)
properties - public Config getConfig()
public void setConfig(Config config)
config - public void registerMapper(Class<?> mapperClass)
mapperClass - public void registerMapper(String mapperClass)
mapperClass - public boolean isMapperMethod(String msId)
msId - public boolean isExtendCommonMapper(Class<?> mapperInterface)
mapperInterface - public void setSqlSource(org.apache.ibatis.mapping.MappedStatement ms)
ms - public void setProperties(Properties properties)
properties - 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 - Copyright © 2017. All rights reserved.