public class NutMappingField extends AbstractEntityField implements MappingField
构造器和说明 |
---|
NutMappingField(Entity<?> entity) |
限定符和类型 | 方法和说明 |
---|---|
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 |
setAsAutoIncreasement() |
void |
setAsCompositePk() |
void |
setAsId() |
void |
setAsName() |
void |
setAsNotNull()
将字段设置成非空约束
|
void |
setAsReadonly()
将字段设置成只读
|
void |
setAsUnsigned() |
void |
setAsVersion() |
void |
setAutoIncreasement(boolean autoIncreasement) |
void |
setCasesensitive(boolean casesensitive) |
void |
setColumnComment(String columnComment) |
void |
setColumnName(String columnName) |
void |
setColumnNameInSql(String columnNameInSql) |
void |
setColumnType(ColType columnType)
设置字段在数据库中的类型
|
void |
setCustomDbType(String customDbType) |
void |
setDefaultValue(Segment defaultValue) |
void |
setHasColumnComment(boolean hasColumnComment) |
void |
setInsert(boolean insert) |
void |
setPrecision(int precision) |
void |
setUpdate(boolean update) |
void |
setWidth(int width) |
getEntity, getName, getType, getTypeClass, getTypeMirror, getValue, setEjecting, setInjecting, setName, setType, setValue, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getEntity, getName, getType, getTypeClass, getTypeMirror, getValue, setValue
public NutMappingField(Entity<?> entity)
public ValueAdaptor getAdaptor()
getAdaptor
在接口中 MappingField
public void setAdaptor(ValueAdaptor adaptor)
MappingField
setAdaptor
在接口中 MappingField
adaptor
- 字段值适配器public void injectValue(Object obj, Record rec, String prefix)
MappingField
injectValue
在接口中 MappingField
obj
- 被注入对象rec
- 结果集prefix
- TODOpublic void injectValue(Object obj, ResultSet rs, String prefix)
MappingField
injectValue
在接口中 MappingField
obj
- 被注入对象rs
- 结果集prefix
- TODOpublic String getColumnName()
getColumnName
在接口中 MappingField
public ColType getColumnType()
getColumnType
在接口中 MappingField
public String getDefaultValue(Object obj)
MappingField
getDefaultValue
在接口中 MappingField
obj
- 当前实体的实例对象Default
public int getWidth()
getWidth
在接口中 MappingField
public int getPrecision()
getPrecision
在接口中 MappingField
public boolean isCompositePk()
isCompositePk
在接口中 MappingField
public boolean isPk()
isPk
在接口中 MappingField
public boolean isId()
isId
在接口中 MappingField
public boolean isName()
isName
在接口中 MappingField
public boolean isReadonly()
isReadonly
在接口中 MappingField
public boolean hasDefaultValue()
hasDefaultValue
在接口中 MappingField
public boolean isNotNull()
isNotNull
在接口中 MappingField
public boolean isCasesensitive()
isCasesensitive
在接口中 MappingField
public boolean isAutoIncreasement()
MappingField
isAutoIncreasement
在接口中 MappingField
public boolean isUnsigned()
isUnsigned
在接口中 MappingField
public void setColumnName(String columnName)
public void setColumnType(ColType columnType)
MappingField
setColumnType
在接口中 MappingField
columnType
- 数据库字段的类型public void setColumnComment(String columnComment)
public void setHasColumnComment(boolean hasColumnComment)
public void setDefaultValue(Segment defaultValue)
public void setWidth(int width)
public void setPrecision(int precision)
public void setAsCompositePk()
public void setAsId()
public void setAsName()
public void setAsReadonly()
MappingField
setAsReadonly
在接口中 MappingField
public void setAsNotNull()
MappingField
setAsNotNull
在接口中 MappingField
public void setAsUnsigned()
public void setCasesensitive(boolean casesensitive)
public void setAsAutoIncreasement()
public void setAutoIncreasement(boolean autoIncreasement)
public String getColumnComment()
getColumnComment
在接口中 MappingField
public boolean hasColumnComment()
hasColumnComment
在接口中 MappingField
public void setCustomDbType(String customDbType)
setCustomDbType
在接口中 MappingField
public String getCustomDbType()
getCustomDbType
在接口中 MappingField
public boolean isInsert()
isInsert
在接口中 MappingField
public boolean isUpdate()
isUpdate
在接口中 MappingField
public void setInsert(boolean insert)
public void setUpdate(boolean update)
public String getColumnNameInSql()
getColumnNameInSql
在接口中 MappingField
public void setColumnNameInSql(String columnNameInSql)
public boolean isVersion()
isVersion
在接口中 MappingField
public void setAsVersion()
Copyright © 2017. All rights reserved.