public class EntityColumn extends EntityProps<EntityColumn>
| Modifier and Type | Field and Description |
|---|---|
protected String |
column
列名
|
protected EntityTable |
entityTable
所在实体类
|
protected EntityField |
field
实体类字段
|
protected boolean |
id
是否为主键
|
protected boolean |
insertable
是否插入字段
|
protected org.apache.ibatis.type.JdbcType |
jdbcType
jdbc类型
|
protected String |
numericScale
精度
|
protected String |
orderBy
排序方式
|
protected int |
orderByPriority
排序的优先级,数值越小优先级越高
|
protected boolean |
selectable
是否查询字段
|
protected Class<? extends org.apache.ibatis.type.TypeHandler> |
typeHandler
类型处理器
|
protected boolean |
updatable
是否更新字段
|
props| Modifier | Constructor and Description |
|---|---|
protected |
EntityColumn(EntityField field) |
| Modifier and Type | Method and Description |
|---|---|
String |
columnAsProperty()
返回 column AS property 形式的字符串, 当 column 和 property 相同时没有别名
|
String |
columnAsProperty(String prefix)
返回 column AS prefixproperty 形式的字符串
|
String |
columnEqualsProperty()
返回 column = #{property} 形式的字符串
|
String |
columnEqualsProperty(String prefix)
返回带前缀的 column = #{prefixproperty} 形式的字符串
|
boolean |
equals(Object o) |
int |
hashCode() |
Class<?> |
javaType()
Java 类型
|
Optional<String> |
jdbcTypeVariables()
数据库类型 {, jdbcType=VARCHAR}
|
String |
notEmptyTest()
当字段类型为 String 时,返回 property != null and property != '' 形式的字符串.
|
String |
notEmptyTest(String prefix)
当字段类型为 String 时,返回 prefixproperty != null and prefixproperty != '' 形式的字符串.
|
String |
notNullTest()
返回 property != null 形式的字符串
|
String |
notNullTest(String prefix)
返回带前缀的 prefixproperty != null 形式的字符串
|
Optional<String> |
numericScaleVariables()
小数位数 {, numericScale=2}
|
static EntityColumn |
of(EntityField field) |
String |
property()
属性名
|
String |
property(String prefix)
带指定前缀的属性名
|
String |
toString() |
Optional<String> |
typeHandlerVariables()
类型处理器 {, typeHandler=XXTypeHandler}
|
String |
variables()
返回 xml 变量形式 #{property}
|
String |
variables(String prefix)
返回带前缀的 xml 变量形式 #{prefixproperty}
|
getEntityPropValue, getProp, getProp, removeProp, setProp, setProp, setPropsprotected final EntityField field
protected EntityTable entityTable
protected String column
protected boolean id
protected String orderBy
protected int orderByPriority
protected boolean selectable
protected boolean insertable
protected boolean updatable
protected org.apache.ibatis.type.JdbcType jdbcType
protected Class<? extends org.apache.ibatis.type.TypeHandler> typeHandler
protected String numericScale
protected EntityColumn(EntityField field)
public static EntityColumn of(EntityField field)
public Class<?> javaType()
public String property()
public String variables()
public String variables(String prefix)
prefix - 指定前缀,需要自己提供"."public Optional<String> typeHandlerVariables()
public String columnAsProperty()
public String columnAsProperty(String prefix)
prefix - 指定前缀,需要自己提供"."public String columnEqualsProperty()
public String columnEqualsProperty(String prefix)
prefix - 指定前缀,需要自己提供"."public String notNullTest()
public String notNullTest(String prefix)
prefix - 指定前缀,需要自己提供"."public String notEmptyTest()
notNullTest() 方法一样.public String notEmptyTest(String prefix)
notNullTest() 方法一样.prefix - 指定前缀,需要自己提供"."Copyright © 2022. All rights reserved.