public class XMLObjectReferenceMappingNodeValue extends MappingNodeValue
Purpose: Class to handle (un)marshal operations for XMLObjectReferenceMappings. An instance of this class is required for each XMLField set on the mapping, that is, for each source field in the source-target key field association list.
When unmarshalling, an instance of org.eclipse.persistence.internal.oxm.Reference is created on a per mapping basis (keyed on source object instance) and sotred on the associated session's org.eclipse.persistence.internal.oxm.ReferenceResolver instance. Each target primary key value is stored in the Reference instance for use during mapping resolution phase after unmarshalling completes.
When marshalling, the target object's primary key value that is mapped to this NodeValue's XMLField (in the XMLObjectReferenceMapping's source-target key field association list) is retrieved and written out.
Reference
,
ReferenceResolver
,
XMLObjectReferenceMapping
Constructor and Description |
---|
XMLObjectReferenceMappingNodeValue(ObjectReferenceMapping xmlObjectReferenceMapping)
This constructor sets the XMLObjectReferenceMapping member to the provided
value.
|
XMLObjectReferenceMappingNodeValue(ObjectReferenceMapping xmlObjectReferenceMapping,
Field xmlField)
This constructor sets the XMLObjectReferenceMapping and XMLField members to
the provided values.
|
Modifier and Type | Method and Description |
---|---|
void |
attribute(UnmarshalRecord unmarshalRecord,
java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String value)
Handle attribute operation.
|
void |
endElement(XPathFragment xPathFragment,
UnmarshalRecord unmarshalRecord)
Handle endElement operation.
|
ObjectReferenceMapping |
getMapping()
Return the mapping associated with this node value.
|
boolean |
isOwningNode(XPathFragment xPathFragment)
Indicate if the XPathFragment is an attribute or text() node.
|
boolean |
marshal(XPathFragment xPathFragment,
MarshalRecord marshalRecord,
java.lang.Object object,
CoreAbstractSession session,
NamespaceResolver namespaceResolver)
Handle the marshal operation for this NodeValue's XMLField.
|
boolean |
marshal(XPathFragment xPathFragment,
MarshalRecord marshalRecord,
java.lang.Object object,
CoreAbstractSession session,
NamespaceResolver namespaceResolver,
MarshalContext marshalContext)
Handle the marshal operation for this NodeValue's XMLField.
|
boolean |
marshalSingleValue(XPathFragment xPathFragment,
MarshalRecord marshalRecord,
java.lang.Object object,
java.lang.Object targetObject,
CoreAbstractSession session,
NamespaceResolver namespaceResolver,
MarshalContext marshalContext)
INTERNAL:
This method provides an optimization in cases where the value has already
been calculated.
|
isMappingNodeValue
buildSelfRecord, endElement, endSelfNodeValue, getXPathNode, isAnyMappingNodeValue, isContainerValue, isMarshalNodeValue, isMarshalOnlyNodeValue, isMixedContentNodeValue, isNullCapableValue, isUnmarshalNodeValue, isWhitespaceAware, isWrapperNodeValue, marshal, marshal, marshalSelfAttributes, marshalSingleValue, setXPathNode, startElement
public XMLObjectReferenceMappingNodeValue(ObjectReferenceMapping xmlObjectReferenceMapping)
xmlObjectReferenceMapping
- public XMLObjectReferenceMappingNodeValue(ObjectReferenceMapping xmlObjectReferenceMapping, Field xmlField)
xmlObjectReferenceMapping
- xmlField
- public void attribute(UnmarshalRecord unmarshalRecord, java.lang.String namespaceURI, java.lang.String localName, java.lang.String value)
public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord)
endElement
in class NodeValue
public boolean isOwningNode(XPathFragment xPathFragment)
isOwningNode
in class NodeValue
public boolean marshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver)
public boolean marshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext)
public boolean marshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, java.lang.Object targetObject, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext)
NodeValue
marshalSingleValue
in class NodeValue
public ObjectReferenceMapping getMapping()
MappingNodeValue
getMapping
in class MappingNodeValue
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference