Package org.miaixz.bus.mapper.builder
Class MapperBuilder
java.lang.Object
org.miaixz.bus.mapper.builder.MapperBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription获取通用Mapper配置根据 msId 获取 MapperTemplatebooleanisExtendCommonMapper(Class<?> mapperInterface) 判断接口是否包含通用接口,isMapperMethod(String msId) 判断当前的接口方法是否需要进行拦截voidprocessConfiguration(org.apache.ibatis.session.Configuration configuration) 配置完成后,执行下面的操作 处理configuration中全部的MappedStatementvoidprocessConfiguration(org.apache.ibatis.session.Configuration configuration, Class<?> mapperInterface) 配置指定的接口voidprocessMappedStatement(org.apache.ibatis.mapping.MappedStatement ms) 处理 MappedStatementvoidregisterMapper(Class<?> mapperClass) 注册通用Mapper接口voidregisterMapper(String mapperClass) 注册通用Mapper接口void设置通用Mapper配置voidsetProperties(Properties properties) 配置属性voidsetRawSqlSourceMapper(org.apache.ibatis.mapping.MappedStatement ms) 设置原生Mybatis查询的实体映射, JPA的注解优先级将高于mybatis自动映射voidsetSqlSource(org.apache.ibatis.mapping.MappedStatement ms, MapperTemplate mapperTemplate) 重新设置SqlSource 执行该方法前必须使用isMapperMethod判断,否则msIdCache会空
-
Constructor Details
-
MapperBuilder
public MapperBuilder()默认构造方法 -
MapperBuilder
-
-
Method Details
-
registerMapper
-
registerMapper
-
isMapperMethod
判断当前的接口方法是否需要进行拦截- Parameters:
msId- 方法信息- Returns:
- the object
-
getMapperTemplateByMsId
根据 msId 获取 MapperTemplate- Parameters:
msId- 方法信息- Returns:
- the object
-
isExtendCommonMapper
判断接口是否包含通用接口,- Parameters:
mapperInterface- 接口信息- Returns:
- the boolean
-
processConfiguration
public void processConfiguration(org.apache.ibatis.session.Configuration configuration) 配置完成后,执行下面的操作 处理configuration中全部的MappedStatement- Parameters:
configuration- 配置
-
processConfiguration
public void processConfiguration(org.apache.ibatis.session.Configuration configuration, Class<?> mapperInterface) 配置指定的接口- Parameters:
configuration- 配置mapperInterface- 接口
-
processMappedStatement
public void processMappedStatement(org.apache.ibatis.mapping.MappedStatement ms) 处理 MappedStatement- Parameters:
ms- MappedStatement
-
getConfig
-
setConfig
-
setProperties
-
setSqlSource
public void setSqlSource(org.apache.ibatis.mapping.MappedStatement ms, MapperTemplate mapperTemplate) 重新设置SqlSource 执行该方法前必须使用isMapperMethod判断,否则msIdCache会空- Parameters:
ms- MappedStatementmapperTemplate- 模板信息
-
setRawSqlSourceMapper
public void setRawSqlSourceMapper(org.apache.ibatis.mapping.MappedStatement ms) 设置原生Mybatis查询的实体映射, JPA的注解优先级将高于mybatis自动映射
-