public interface MappingField extends EntityField
限定符和类型 | 方法和说明 |
---|---|
ValueAdaptor |
getAdaptor() |
String |
getColumnComment() |
String |
getColumnName() |
String |
getColumnNameInSql() |
ColType |
getColumnType() |
String |
getCustomDbType() |
String |
getDefaultValue(Object obj)
根据实体的实例对象,获取默认值
|
int |
getPrecision() |
int |
getWidth() |
boolean |
hasColumnComment() |
boolean |
hasDefaultValue() |
void |
injectValue(Object obj,
Record rec,
String prefix)
通过 Record 为映射字段注入值
|
void |
injectValue(Object obj,
ResultSet rs,
String prefix)
通过 resultSet 为映射字段注入值
|
boolean |
isAutoIncreasement()
这个判断仅仅对于创建语句有作用。
|
boolean |
isCasesensitive() |
boolean |
isCompositePk() |
boolean |
isId() |
boolean |
isInsert() |
boolean |
isName() |
boolean |
isNotNull() |
boolean |
isPk() |
boolean |
isReadonly() |
boolean |
isUnsigned() |
boolean |
isUpdate() |
boolean |
isVersion() |
void |
setAdaptor(ValueAdaptor adaptor)
设置字段值适配器
|
void |
setAsNotNull()
将字段设置成非空约束
|
void |
setAsReadonly()
将字段设置成只读
|
void |
setColumnType(ColType colType)
设置字段在数据库中的类型
|
void |
setCustomDbType(String customDbType) |
getEntity, getName, getType, getTypeClass, getTypeMirror, getValue, setValue
void injectValue(Object obj, Record rec, String prefix)
obj
- 被注入对象rec
- 结果集prefix
- TODOvoid injectValue(Object obj, ResultSet rs, String prefix)
obj
- 被注入对象rs
- 结果集prefix
- TODOValueAdaptor getAdaptor()
void setAdaptor(ValueAdaptor adaptor)
adaptor
- 字段值适配器String getColumnName()
String getColumnNameInSql()
String getColumnComment()
ColType getColumnType()
void setColumnType(ColType colType)
colType
- 数据库字段的类型String getDefaultValue(Object obj)
obj
- 当前实体的实例对象Default
int getWidth()
int getPrecision()
boolean isPk()
boolean isCompositePk()
boolean isId()
boolean isName()
boolean isReadonly()
void setAsReadonly()
boolean hasDefaultValue()
boolean isNotNull()
boolean isUnsigned()
boolean isCasesensitive()
void setAsNotNull()
boolean isAutoIncreasement()
boolean hasColumnComment()
void setCustomDbType(String customDbType)
String getCustomDbType()
boolean isInsert()
boolean isUpdate()
boolean isVersion()
Copyright © 2017. All rights reserved.