Package com.baomidou.mybatisplus.core
Class MybatisParameterHandler
java.lang.Object
org.apache.ibatis.scripting.defaults.DefaultParameterHandler
com.baomidou.mybatisplus.core.MybatisParameterHandler
- All Implemented Interfaces:
org.apache.ibatis.executor.parameter.ParameterHandler
public class MybatisParameterHandler
extends org.apache.ibatis.scripting.defaults.DefaultParameterHandler
自定义 ParameterHandler 重装构造函数,填充插入方法主键 ID
- Since:
- 3.4.0
- Author:
- nieqiuqiu 2020/6/5
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMybatisParameterHandler(org.apache.ibatis.mapping.MappedStatement mappedStatement, Object parameter, org.apache.ibatis.mapping.BoundSql boundSql) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidfillLogicDeleteValue(org.apache.ibatis.reflection.MetaObject metaObject, TableInfo tableInfo) protected Collection<Object> getParameters(Object parameterObject) Deprecated.3.5.3.2protected voidinsertFill(org.apache.ibatis.reflection.MetaObject metaObject, TableInfo tableInfo) protected voidpopulateKeys(TableInfo tableInfo, org.apache.ibatis.reflection.MetaObject metaObject, Object entity) voidprocessParameter(Object parameter) protected Collection<Object> toCollection(Object value) protected voidupdateFill(org.apache.ibatis.reflection.MetaObject metaObject, TableInfo tableInfo) Methods inherited from class org.apache.ibatis.scripting.defaults.DefaultParameterHandler
getParameterObject, setParameters
-
Field Details
-
COLLECTION_KEYS
Deprecated.3.5.4填充的key值- Since:
- 3.5.3.2
-
-
Constructor Details
-
MybatisParameterHandler
public MybatisParameterHandler(org.apache.ibatis.mapping.MappedStatement mappedStatement, Object parameter, org.apache.ibatis.mapping.BoundSql boundSql)
-
-
Method Details
-
processParameter
-
fillLogicDeleteValue
protected void fillLogicDeleteValue(org.apache.ibatis.reflection.MetaObject metaObject, TableInfo tableInfo) -
populateKeys
-
insertFill
-
updateFill
-
getParameters
Deprecated.3.5.3.2处理正常批量插入逻辑org.apache.ibatis.session.defaults.DefaultSqlSession$StrictMap 该类方法 wrapCollection 实现 StrictMap 封装逻辑
- Returns:
- 集合参数
-
toCollection
-