类 AbstractMethod
java.lang.Object
com.baomidou.mybatisplus.core.injector.AbstractMethod
- 所有已实现的接口:
Constants,StringPool,Serializable
- 直接已知子类:
Delete,DeleteById,DeleteByIds,DeleteByMap,Insert,SelectById,SelectByIds,SelectByMap,SelectCount,SelectList,SelectMaps,SelectMapsPage,SelectObjs,SelectOne,SelectPage,Update,UpdateById
抽象的注入方法类
- 从以下版本开始:
- 2018-04-06
- 作者:
- hubin
- 另请参阅:
-
字段概要
字段修饰符和类型字段说明protected org.apache.ibatis.builder.MapperBuilderAssistantprotected org.apache.ibatis.session.Configurationprotected org.apache.ibatis.scripting.LanguageDriverprotected final org.apache.ibatis.logging.Logprotected final String方法名称从接口继承的字段 com.baomidou.mybatisplus.core.toolkit.Constants
AES, AES_CBC_CIPHER, ARRAY, AS, ASC, COLL, COLLECTION, COLUMN_MAP, COLUMN_MAP_IS_EMPTY, DEFAULT_BATCH_SIZE, DESC, ENTITY, ENTITY_DOT, LIMIT, LIST, MD5, MP_FILL_ET, MP_OPTLOCK_VERSION_ORIGINAL, MYBATIS_PLUS, ORDER_BY, Q_WRAPPER_SQL_COMMENT, Q_WRAPPER_SQL_FIRST, Q_WRAPPER_SQL_SELECT, U_WRAPPER_SQL_SET, WHERE, WRAPPER, WRAPPER_DOT, WRAPPER_EMPTYOFNORMAL, WRAPPER_EMPTYOFWHERE, WRAPPER_ENTITY, WRAPPER_ENTITY_DOT, WRAPPER_EXPRESSION_ORDER, WRAPPER_NONEMPTYOFENTITY, WRAPPER_NONEMPTYOFNORMAL, WRAPPER_NONEMPTYOFWHERE, WRAPPER_PARAM, WRAPPER_PARAM_MIDDLE, WRAPPER_SQLSEGMENT从接口继承的字段 com.baomidou.mybatisplus.core.toolkit.StringPool
AMPERSAND, AND, ASTERISK, AT, BACK_SLASH, BACKTICK, BYTES_NEW_LINE, COLON, COMMA, CRLF, DASH, DOLLAR, DOLLAR_LEFT_BRACE, DOT, DOT_CLASS, DOT_JAVA, DOT_NEWLINE, DOT_XML, DOTDOT, EMPTY, EMPTY_ARRAY, EQUALS, EXCLAMATION_MARK, FALSE, HASH, HASH_LEFT_BRACE, HAT, HTML_AMP, HTML_GT, HTML_LT, HTML_NBSP, HTML_QUOTE, ISO_8859_1, LEFT_BRACE, LEFT_BRACKET, LEFT_CHEV, LEFT_SQ_BRACKET, N, NEWLINE, NO, NULL, NUM, OFF, ON, ONE, PERCENT, PIPE, PLUS, QUESTION_MARK, QUOTE, RETURN, RIGHT_BRACE, RIGHT_BRACKET, RIGHT_CHEV, RIGHT_SQ_BRACKET, SEMICOLON, SINGLE_QUOTE, SLASH, SPACE, SQL, STAR, TAB, TILDA, TRUE, UNDERSCORE, US_ASCII, UTF_8, Y, YES, ZERO -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected org.apache.ibatis.mapping.MappedStatementaddDeleteMappedStatement(Class<?> mapperClass, String id, org.apache.ibatis.mapping.SqlSource sqlSource) 删除protected org.apache.ibatis.mapping.MappedStatementaddDeleteMappedStatement(Class<?> mapperClass, org.apache.ibatis.mapping.SqlSource sqlSource) protected org.apache.ibatis.mapping.MappedStatementaddInsertMappedStatement(Class<?> mapperClass, Class<?> parameterType, String id, org.apache.ibatis.mapping.SqlSource sqlSource, org.apache.ibatis.executor.keygen.KeyGenerator keyGenerator, String keyProperty, String keyColumn) 插入protected org.apache.ibatis.mapping.MappedStatementaddInsertMappedStatement(Class<?> mapperClass, Class<?> parameterType, org.apache.ibatis.mapping.SqlSource sqlSource, org.apache.ibatis.executor.keygen.KeyGenerator keyGenerator, String keyProperty, String keyColumn) 插入protected org.apache.ibatis.mapping.MappedStatementaddMappedStatement(Class<?> mapperClass, String id, org.apache.ibatis.mapping.SqlSource sqlSource, org.apache.ibatis.mapping.SqlCommandType sqlCommandType, Class<?> parameterType, String resultMap, Class<?> resultType, org.apache.ibatis.executor.keygen.KeyGenerator keyGenerator, String keyProperty, String keyColumn) 添加 MappedStatement 到 Mybatis 容器protected org.apache.ibatis.mapping.MappedStatementaddMappedStatement(Class<?> mapperClass, org.apache.ibatis.mapping.SqlSource sqlSource, org.apache.ibatis.mapping.SqlCommandType sqlCommandType, Class<?> parameterType, String resultMap, Class<?> resultType, org.apache.ibatis.executor.keygen.KeyGenerator keyGenerator, String keyProperty, String keyColumn) protected org.apache.ibatis.mapping.MappedStatementaddSelectMappedStatementForOther(Class<?> mapperClass, String id, org.apache.ibatis.mapping.SqlSource sqlSource, Class<?> resultType) 查询protected org.apache.ibatis.mapping.MappedStatementaddSelectMappedStatementForOther(Class<?> mapperClass, org.apache.ibatis.mapping.SqlSource sqlSource, Class<?> resultType) 查询protected org.apache.ibatis.mapping.MappedStatementaddSelectMappedStatementForTable(Class<?> mapperClass, String id, org.apache.ibatis.mapping.SqlSource sqlSource, TableInfo table) 查询protected org.apache.ibatis.mapping.MappedStatementaddSelectMappedStatementForTable(Class<?> mapperClass, org.apache.ibatis.mapping.SqlSource sqlSource, TableInfo table) 查询protected org.apache.ibatis.mapping.MappedStatementaddUpdateMappedStatement(Class<?> mapperClass, Class<?> parameterType, String id, org.apache.ibatis.mapping.SqlSource sqlSource) 更新protected org.apache.ibatis.mapping.MappedStatementaddUpdateMappedStatement(Class<?> mapperClass, Class<?> parameterType, org.apache.ibatis.mapping.SqlSource sqlSource) 更新protected StringconvertChooseEwSelect(String otherwise) protected StringconvertIfEwParam(String param, boolean newLine) org.apache.ibatis.mapping.SqlSourcecreateSqlSource(org.apache.ibatis.session.Configuration configuration, String script, Class<?> parameterType) protected StringfilterTableFieldInfo(List<TableFieldInfo> fieldList, Predicate<TableFieldInfo> predicate, Function<TableFieldInfo, String> function, String joiningVal) 过滤 TableFieldInfo 集合, join 成字符串voidinject(org.apache.ibatis.builder.MapperBuilderAssistant builderAssistant, Class<?> mapperClass, Class<?> modelClass, TableInfo tableInfo) 注入自定义方法abstract org.apache.ibatis.mapping.MappedStatementinjectMappedStatement(Class<?> mapperClass, Class<?> modelClass, TableInfo tableInfo) 注入自定义 MappedStatementprotected StringoptlockVersion(TableInfo tableInfo) 获取乐观锁相关protected StringSQL 注释protected StringsqlCount()SQL 查询记录行数protected StringsqlFirst()SQL 注释protected StringsqlLogicSet(TableInfo table) SQL 更新 set 语句protected StringsqlOrderBy(TableInfo tableInfo) protected StringsqlSelectColumns(TableInfo table, boolean queryWrapper) SQL 查询所有表字段protected StringsqlSelectObjsColumns(TableInfo table) SQL 设置selectObj sql selectprotected StringsqlSet(boolean logic, boolean ew, TableInfo table, boolean judgeAliasNull, String alias, String prefix) SQL 更新 set 语句protected StringsqlWhereByMap(TableInfo table) 已过时。protected StringsqlWhereEntityWrapper(boolean newLine, TableInfo table) EntityWrapper方式获取select where
-
字段详细资料
-
logger
protected final org.apache.ibatis.logging.Log logger -
configuration
protected org.apache.ibatis.session.Configuration configuration -
languageDriver
protected org.apache.ibatis.scripting.LanguageDriver languageDriver -
builderAssistant
protected org.apache.ibatis.builder.MapperBuilderAssistant builderAssistant -
methodName
方法名称- 从以下版本开始:
- 3.5.0
-
-
构造器详细资料
-
AbstractMethod
- 参数:
methodName- 方法名- 从以下版本开始:
- 3.5.0
-
-
方法详细资料
-
inject
public void inject(org.apache.ibatis.builder.MapperBuilderAssistant builderAssistant, Class<?> mapperClass, Class<?> modelClass, TableInfo tableInfo) 注入自定义方法 -
sqlLogicSet
SQL 更新 set 语句- 参数:
table- 表信息- 返回:
- sql set 片段
-
sqlSet
protected String sqlSet(boolean logic, boolean ew, TableInfo table, boolean judgeAliasNull, String alias, String prefix) SQL 更新 set 语句- 参数:
logic- 是否逻辑删除注入器ew- 是否存在 UpdateWrapper 条件table- 表信息alias- 别名prefix- 前缀- 返回:
- sql
-
sqlComment
SQL 注释- 返回:
- sql
-
sqlFirst
SQL 注释- 返回:
- sql
-
convertIfEwParam
-
sqlSelectColumns
SQL 查询所有表字段- 参数:
table- 表信息queryWrapper- 是否为使用 queryWrapper 查询- 返回:
- sql 脚本
-
sqlCount
SQL 查询记录行数- 返回:
- count sql 脚本
-
sqlSelectObjsColumns
SQL 设置selectObj sql select- 参数:
table- 表信息
-
convertChooseEwSelect
-
sqlWhereByMap
已过时。SQL map 查询条件 -
sqlWhereEntityWrapper
EntityWrapper方式获取select where- 参数:
newLine- 是否提到下一行table- 表信息- 返回:
- String
-
sqlOrderBy
-
filterTableFieldInfo
protected String filterTableFieldInfo(List<TableFieldInfo> fieldList, Predicate<TableFieldInfo> predicate, Function<TableFieldInfo, String> function, String joiningVal) 过滤 TableFieldInfo 集合, join 成字符串 -
optlockVersion
获取乐观锁相关- 参数:
tableInfo- 表信息- 返回:
- String
-
addSelectMappedStatementForTable
protected org.apache.ibatis.mapping.MappedStatement addSelectMappedStatementForTable(Class<?> mapperClass, String id, org.apache.ibatis.mapping.SqlSource sqlSource, TableInfo table) 查询 -
addSelectMappedStatementForTable
protected org.apache.ibatis.mapping.MappedStatement addSelectMappedStatementForTable(Class<?> mapperClass, org.apache.ibatis.mapping.SqlSource sqlSource, TableInfo table) 查询- 从以下版本开始:
- 3.5.0
-
addSelectMappedStatementForOther
protected org.apache.ibatis.mapping.MappedStatement addSelectMappedStatementForOther(Class<?> mapperClass, String id, org.apache.ibatis.mapping.SqlSource sqlSource, Class<?> resultType) 查询 -
addSelectMappedStatementForOther
protected org.apache.ibatis.mapping.MappedStatement addSelectMappedStatementForOther(Class<?> mapperClass, org.apache.ibatis.mapping.SqlSource sqlSource, Class<?> resultType) 查询- 从以下版本开始:
- 3.5.0
-
addInsertMappedStatement
protected org.apache.ibatis.mapping.MappedStatement addInsertMappedStatement(Class<?> mapperClass, Class<?> parameterType, String id, org.apache.ibatis.mapping.SqlSource sqlSource, org.apache.ibatis.executor.keygen.KeyGenerator keyGenerator, String keyProperty, String keyColumn) 插入 -
addInsertMappedStatement
protected org.apache.ibatis.mapping.MappedStatement addInsertMappedStatement(Class<?> mapperClass, Class<?> parameterType, org.apache.ibatis.mapping.SqlSource sqlSource, org.apache.ibatis.executor.keygen.KeyGenerator keyGenerator, String keyProperty, String keyColumn) 插入- 从以下版本开始:
- 3.5.0
-
addDeleteMappedStatement
protected org.apache.ibatis.mapping.MappedStatement addDeleteMappedStatement(Class<?> mapperClass, String id, org.apache.ibatis.mapping.SqlSource sqlSource) 删除 -
addDeleteMappedStatement
protected org.apache.ibatis.mapping.MappedStatement addDeleteMappedStatement(Class<?> mapperClass, org.apache.ibatis.mapping.SqlSource sqlSource) - 从以下版本开始:
- 3.5.0
-
addUpdateMappedStatement
protected org.apache.ibatis.mapping.MappedStatement addUpdateMappedStatement(Class<?> mapperClass, Class<?> parameterType, String id, org.apache.ibatis.mapping.SqlSource sqlSource) 更新 -
addUpdateMappedStatement
protected org.apache.ibatis.mapping.MappedStatement addUpdateMappedStatement(Class<?> mapperClass, Class<?> parameterType, org.apache.ibatis.mapping.SqlSource sqlSource) 更新- 从以下版本开始:
- 3.5.0
-
addMappedStatement
protected org.apache.ibatis.mapping.MappedStatement addMappedStatement(Class<?> mapperClass, String id, org.apache.ibatis.mapping.SqlSource sqlSource, org.apache.ibatis.mapping.SqlCommandType sqlCommandType, Class<?> parameterType, String resultMap, Class<?> resultType, org.apache.ibatis.executor.keygen.KeyGenerator keyGenerator, String keyProperty, String keyColumn) 添加 MappedStatement 到 Mybatis 容器 -
addMappedStatement
protected org.apache.ibatis.mapping.MappedStatement addMappedStatement(Class<?> mapperClass, org.apache.ibatis.mapping.SqlSource sqlSource, org.apache.ibatis.mapping.SqlCommandType sqlCommandType, Class<?> parameterType, String resultMap, Class<?> resultType, org.apache.ibatis.executor.keygen.KeyGenerator keyGenerator, String keyProperty, String keyColumn) - 从以下版本开始:
- 3.5.0
-
injectMappedStatement
public abstract org.apache.ibatis.mapping.MappedStatement injectMappedStatement(Class<?> mapperClass, Class<?> modelClass, TableInfo tableInfo) 注入自定义 MappedStatement- 参数:
mapperClass- mapper 接口modelClass- mapper 泛型tableInfo- 数据库表反射信息- 返回:
- MappedStatement
-
createSqlSource
public org.apache.ibatis.mapping.SqlSource createSqlSource(org.apache.ibatis.session.Configuration configuration, String script, Class<?> parameterType) - 参数:
configuration- 配置对象script- (统一去除空白行)parameterType- 参数类型- 返回:
- SqlSource
- 从以下版本开始:
- 3.5.3.2
-