public class MapperHelper extends Object
Constructor and Description |
---|
MapperHelper()
默认构造方法
|
MapperHelper(Properties properties)
带配置的构造方法
|
Modifier and Type | Method and Description |
---|---|
Config |
getConfig()
获取通用Mapper配置
|
MapperTemplate |
getMapperTemplateByMsId(String msId)
根据 msId 获取 MapperTemplate
|
boolean |
isExtendCommonMapper(Class<?> mapperInterface)
判断接口是否包含通用接口,
|
MapperTemplate |
isMapperMethod(String msId)
判断当前的接口方法是否需要进行拦截
|
void |
processConfiguration(org.apache.ibatis.session.Configuration configuration)
配置完成后,执行下面的操作
处理configuration中全部的MappedStatement |
void |
processConfiguration(org.apache.ibatis.session.Configuration configuration,
Class<?> mapperInterface)
配置指定的接口
|
void |
processMappedStatement(org.apache.ibatis.mapping.MappedStatement ms)
处理 MappedStatement
|
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,
MapperTemplate mapperTemplate)
重新设置SqlSource
执行该方法前必须使用isMapperMethod判断,否则msIdCache会空 |
public MapperHelper()
public MapperHelper(Properties properties)
properties
- public void registerMapper(Class<?> mapperClass)
mapperClass
- public void registerMapper(String mapperClass)
mapperClass
- public MapperTemplate isMapperMethod(String msId)
msId
- public MapperTemplate getMapperTemplateByMsId(String msId)
msId
- public boolean isExtendCommonMapper(Class<?> mapperInterface)
mapperInterface
- public void processConfiguration(org.apache.ibatis.session.Configuration configuration)
configuration
- public void processConfiguration(org.apache.ibatis.session.Configuration configuration, Class<?> mapperInterface)
configuration
- mapperInterface
- public void processMappedStatement(org.apache.ibatis.mapping.MappedStatement ms)
ms
- public Config getConfig()
public void setConfig(Config config)
config
- public void setProperties(Properties properties)
properties
- public void setSqlSource(org.apache.ibatis.mapping.MappedStatement ms, MapperTemplate mapperTemplate)
执行该方法前必须使用isMapperMethod判断,否则msIdCache会空
ms
- mapperTemplate
- Copyright © 2018. All rights reserved.