public interface LinkField extends EntityField
Modifier and Type | Method and Description |
---|---|
Condition |
createCondition(Object host)
根据给定的宿主对象,以及自身记录的映射关系,生成一个获取映射对象的约束条件
`@One` 根据宿主对象引用字段值生成映射对象的条件语句
`@Many` 根据宿主对象主键值生成映射对象的条件语句
`@ManyMany` 根据宿主对象以及映射表生成映射对象的条件语句
|
PojoCallback |
getCallback() |
MappingField |
getHostField() |
Entity<?> |
getLinkedEntity() |
MappingField |
getLinkedField() |
LinkType |
getLinkType() |
void |
saveLinkedField(Object obj,
Object linked)
用映射对象的字段更新宿主对象
|
String |
toString() |
void |
updateLinkedField(Object obj,
Object linked)
用宿主对象的字段更新映射对象
|
getEntity, getName, getType, getTypeClass, getTypeMirror, getValue, setValue
LinkType getLinkType()
MappingField getHostField()
MappingField getLinkedField()
Condition createCondition(Object host)
host
- 宿主对象PojoCallback getCallback()
void updateLinkedField(Object obj, Object linked)
obj
- 宿主对象linked
- 被映射的对象void saveLinkedField(Object obj, Object linked)
obj
- 宿主对象linked
- 被映射的对象Entity<?> getLinkedEntity()
Copyright © 2017. All rights reserved.