类 AbstractMethod

java.lang.Object
com.baomidou.mybatisplus.core.injector.AbstractMethod
所有已实现的接口:
Constants, StringPool, Serializable
直接已知子类:
Delete, DeleteBatchByIds, DeleteById, DeleteByMap, Insert, SelectBatchByIds, SelectById, SelectByMap, SelectCount, SelectList, SelectMaps, SelectMapsPage, SelectObjs, SelectOne, SelectPage, Update, UpdateById

public abstract class AbstractMethod
extends Object
implements Constants
抽象的注入方法类
从以下版本开始:
2018-04-06
作者:
hubin
另请参阅:
序列化表格
  • 字段详细资料

    • logger

      protected static 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
  • 构造器详细资料

    • AbstractMethod

      public AbstractMethod()
  • 方法详细资料

    • inject

      public void inject​(org.apache.ibatis.builder.MapperBuilderAssistant builderAssistant, Class<?> mapperClass, Class<?> modelClass, TableInfo tableInfo)
      注入自定义方法
    • sqlLogicSet

      protected String sqlLogicSet​(TableInfo table)
      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

      protected String sqlComment()
      SQL 注释
      返回:
      sql
    • sqlFirst

      protected String sqlFirst()
      SQL 注释
      返回:
      sql
    • sqlSelectColumns

      protected String sqlSelectColumns​(TableInfo table, boolean queryWrapper)
      SQL 查询所有表字段
      参数:
      table - 表信息
      queryWrapper - 是否为使用 queryWrapper 查询
      返回:
      sql 脚本
    • sqlCount

      protected String sqlCount()
      SQL 查询记录行数
      返回:
      count sql 脚本
    • sqlSelectObjsColumns

      protected String sqlSelectObjsColumns​(TableInfo table)
      SQL 设置selectObj sql select
      参数:
      table - 表信息
    • sqlWhereByMap

      protected String sqlWhereByMap​(TableInfo table)
      SQL map 查询条件
    • sqlWhereEntityWrapper

      protected String sqlWhereEntityWrapper​(boolean newLine, TableInfo table)
      EntityWrapper方式获取select where
      参数:
      newLine - 是否提到下一行
      table - 表信息
      返回:
      String
    • filterTableFieldInfo

      protected String filterTableFieldInfo​(List<TableFieldInfo> fieldList, Predicate<TableFieldInfo> predicate, Function<TableFieldInfo,​String> function, String joiningVal)
      过滤 TableFieldInfo 集合, join 成字符串
    • optlockVersion

      protected String optlockVersion​(TableInfo tableInfo)
      获取乐观锁相关
      参数:
      tableInfo - 表信息
      返回:
      String
    • addSelectMappedStatementForTable

      protected org.apache.ibatis.mapping.MappedStatement addSelectMappedStatementForTable​(Class<?> mapperClass, String id, org.apache.ibatis.mapping.SqlSource sqlSource, TableInfo table)
      查询
    • addSelectMappedStatementForOther

      protected org.apache.ibatis.mapping.MappedStatement addSelectMappedStatementForOther​(Class<?> mapperClass, String id, org.apache.ibatis.mapping.SqlSource sqlSource, Class<?> resultType)
      查询
    • 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)
      插入
    • addDeleteMappedStatement

      protected org.apache.ibatis.mapping.MappedStatement addDeleteMappedStatement​(Class<?> mapperClass, String id, org.apache.ibatis.mapping.SqlSource sqlSource)
      删除
    • addUpdateMappedStatement

      protected org.apache.ibatis.mapping.MappedStatement addUpdateMappedStatement​(Class<?> mapperClass, Class<?> parameterType, String id, org.apache.ibatis.mapping.SqlSource sqlSource)
      更新
    • 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 容器
    • injectMappedStatement

      public abstract org.apache.ibatis.mapping.MappedStatement injectMappedStatement​(Class<?> mapperClass, Class<?> modelClass, TableInfo tableInfo)
      注入自定义 MappedStatement
      参数:
      mapperClass - mapper 接口
      modelClass - mapper 泛型
      tableInfo - 数据库表反射信息
      返回:
      MappedStatement
    • getMethod

      public String getMethod​(SqlMethod sqlMethod)
      获取自定义方法名,未设置采用默认方法名 https://gitee.com/baomidou/mybatis-plus/pulls/88
      返回:
      method