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