类 TableFieldInfo

java.lang.Object
com.baomidou.mybatisplus.core.metadata.TableFieldInfo
所有已实现的接口:
Constants, StringPool, Serializable

public class TableFieldInfo extends Object implements Constants
数据库表字段反射信息
从以下版本开始:
2016-09-09
作者:
hubin sjy willenfoo tantan
另请参阅:
  • 构造器详细资料

    • TableFieldInfo

      public TableFieldInfo(GlobalConfig globalConfig, TableInfo tableInfo, Field field, com.baomidou.mybatisplus.annotation.TableField tableField, org.apache.ibatis.reflection.Reflector reflector, boolean existTableLogic, boolean isOrderBy)
      全新的 存在 TableField 注解时使用的构造函数
    • TableFieldInfo

      public TableFieldInfo(GlobalConfig globalConfig, TableInfo tableInfo, Field field, com.baomidou.mybatisplus.annotation.TableField tableField, org.apache.ibatis.reflection.Reflector reflector, boolean existTableLogic)
      全新的 存在 TableField 注解时使用的构造函数
    • TableFieldInfo

      public TableFieldInfo(GlobalConfig globalConfig, TableInfo tableInfo, Field field, org.apache.ibatis.reflection.Reflector reflector, boolean existTableLogic, boolean isOrderBy)
      不存在 TableField 注解时, 使用的构造函数
    • TableFieldInfo

      public TableFieldInfo(GlobalConfig globalConfig, TableInfo tableInfo, Field field, org.apache.ibatis.reflection.Reflector reflector, boolean existTableLogic)
      不存在 TableField 注解时, 使用的构造函数
  • 方法详细资料

    • getInsertSqlProperty

      public String getInsertSqlProperty(String prefix)
      获取 insert 时候插入值 sql 脚本片段

      insert into table (字段) values (值)

      位于 "值" 部位

    • 不生成 if 标签
    • 返回:
      sql 脚本片段
    • getInsertSqlPropertyMaybeIf

      public String getInsertSqlPropertyMaybeIf(String prefix)
      获取 insert 时候插入值 sql 脚本片段

      insert into table (字段) values (值)

      位于 "值" 部位

    • 根据规则会生成 if 标签
    • 返回:
      sql 脚本片段
    • getInsertSqlColumn

      public String getInsertSqlColumn()
      获取 insert 时候字段 sql 脚本片段

      insert into table (字段) values (值)

      位于 "字段" 部位

    • 不生成 if 标签
    • 返回:
      sql 脚本片段
    • getInsertSqlColumnMaybeIf

      public String getInsertSqlColumnMaybeIf(String prefix)
      获取 insert 时候字段 sql 脚本片段

      insert into table (字段) values (值)

      位于 "字段" 部位

    • 根据规则会生成 if 标签
    • 返回:
      sql 脚本片段
    • getSqlSet

      public String getSqlSet(String prefix)
      获取 set sql 片段
      参数:
      prefix - 前缀
      返回:
      sql 脚本片段
    • getSqlSet

      public String getSqlSet(boolean ignoreIf, String prefix)
      获取 set sql 片段
      参数:
      ignoreIf - 忽略 IF 包裹
      prefix - 前缀
      返回:
      sql 脚本片段
    • getSqlWhere

      public String getSqlWhere(String prefix)
      获取 查询的 sql 片段
      参数:
      prefix - 前缀
      返回:
      sql 脚本片段
    • getVersionOli

      public String getVersionOli(String alias, String prefix)
    • getField

      public Field getField()
      属性
      从以下版本开始:
      3.3.1
    • getColumn

      public String getColumn()
      字段名
    • getProperty

      public String getProperty()
      属性名
    • getEl

      public String getEl()
      属性表达式#{property}, 可以指定jdbcType, typeHandler等
    • getMapping

      public String getMapping()
      jdbcType, typeHandler等部分
    • getPropertyType

      public Class<?> getPropertyType()
      属性类型
    • isPrimitive

      public boolean isPrimitive()
      是否是基本数据类型
      从以下版本开始:
      3.4.0 @2020-6-19
    • isCharSequence

      public boolean isCharSequence()
      属性是否是 CharSequence 类型
    • getInsertStrategy

      public com.baomidou.mybatisplus.annotation.FieldStrategy getInsertStrategy()
      字段验证策略之 insert Refer to TableField.insertStrategy()
      从以下版本开始:
      added v_3.1.2 @2019-5-7
    • getUpdateStrategy

      public com.baomidou.mybatisplus.annotation.FieldStrategy getUpdateStrategy()
      字段验证策略之 update Refer to TableField.updateStrategy()
      从以下版本开始:
      added v_3.1.2 @2019-5-7
    • getWhereStrategy

      public com.baomidou.mybatisplus.annotation.FieldStrategy getWhereStrategy()
      字段验证策略之 where Refer to TableField.whereStrategy()
      从以下版本开始:
      added v_3.1.2 @2019-5-7
    • isVersion

      public boolean isVersion()
      是否是乐观锁字段
    • isSelect

      public boolean isSelect()
      是否进行 select 查询

      大字段可设置为 false 不加入 select 查询范围

    • getLogicDeleteValue

      public String getLogicDeleteValue()
      逻辑删除值
    • getLogicNotDeleteValue

      public String getLogicNotDeleteValue()
      逻辑未删除值
    • getUpdate

      public String getUpdate()
      字段 update set 部分注入
    • getCondition

      public String getCondition()
      where 字段比较条件
    • getFieldFill

      public com.baomidou.mybatisplus.annotation.FieldFill getFieldFill()
      字段填充策略
    • isWithInsertFill

      public boolean isWithInsertFill()
      表字段是否启用了插入填充
      从以下版本开始:
      3.3.0
    • isWithUpdateFill

      public boolean isWithUpdateFill()
      表字段是否启用了更新填充
      从以下版本开始:
      3.3.0
    • getSqlSelect

      public String getSqlSelect()
      缓存 sql select
    • getJdbcType

      public org.apache.ibatis.type.JdbcType getJdbcType()
      JDBC类型
      从以下版本开始:
      3.1.2
    • getTypeHandler

      public Class<? extends org.apache.ibatis.type.TypeHandler<?>> getTypeHandler()
      类型处理器
      从以下版本开始:
      3.1.2
    • isOrderBy

      public boolean isOrderBy()
      是否存在OrderBy注解
    • getOrderByType

      public String getOrderByType()
      排序类型
    • getOrderBySort

      public short getOrderBySort()
      排序顺序
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • equals

      public boolean equals(Object o)
      覆盖:
      equals 在类中 Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • isLogicDelete

      public boolean isLogicDelete()
      是否是逻辑删除字段