public class OneLinkField extends AbstractLinkField
holder, hostField, linkedField, mapKey, target, targetType
构造器和说明 |
---|
OneLinkField(Entity<?> entity,
EntityHolder holder,
LinkInfo info) |
OneLinkField(Entity<?> entity,
EntityHolder holder,
LinkInfo info,
Class<?> target,
MappingField field,
MappingField key) |
限定符和类型 | 方法和说明 |
---|---|
Condition |
createCondition(Object host)
根据给定的宿主对象,以及自身记录的映射关系,生成一个获取映射对象的约束条件
`@One` 根据宿主对象引用字段值生成映射对象的条件语句
`@Many` 根据宿主对象主键值生成映射对象的条件语句
`@ManyMany` 根据宿主对象以及映射表生成映射对象的条件语句
|
LinkType |
getLinkType() |
void |
saveLinkedField(Object obj,
Object linked)
用映射对象的字段更新宿主对象
|
void |
updateLinkedField(Object obj,
Object linked)
用宿主对象的字段更新映射对象
|
getCallback, getHostField, getLinkedEntity, getLinkedField, guessTargetClass, setValue
getEntity, getName, getType, getTypeClass, getTypeMirror, getValue, setEjecting, setInjecting, setName, setType, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getEntity, getName, getType, getTypeClass, getTypeMirror, getValue
public OneLinkField(Entity<?> entity, EntityHolder holder, LinkInfo info, Class<?> target, MappingField field, MappingField key)
public OneLinkField(Entity<?> entity, EntityHolder holder, LinkInfo info)
public Condition createCondition(Object host)
LinkField
host
- 宿主对象public void updateLinkedField(Object obj, Object linked)
LinkField
obj
- 宿主对象linked
- 被映射的对象public void saveLinkedField(Object obj, Object linked)
LinkField
obj
- 宿主对象linked
- 被映射的对象public LinkType getLinkType()
Copyright © 2017. All rights reserved.