类 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

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

    • 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

      protected final String methodName
      方法名称
      从以下版本开始:
      3.5.0
  • 构造器详细资料

    • AbstractMethod

      protected AbstractMethod(String methodName)
      参数:
      methodName - 方法名
      从以下版本开始:
      3.5.0
  • 方法详细资料

    • 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
    • convertIfEwParam

      protected String convertIfEwParam(String param, boolean newLine)
    • 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 - 表信息
    • convertChooseEwSelect

      protected String convertChooseEwSelect(String otherwise)
    • sqlWhereByMap

      @Deprecated protected String sqlWhereByMap(TableInfo table)
      已过时。
      SQL map 查询条件
    • sqlWhereEntityWrapper

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

      protected String sqlOrderBy(TableInfo tableInfo)
    • 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)
      查询
    • 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