Module org.eclipse.persistence.core
Class XMLCompositeCollectionMappingNodeValue
java.lang.Object
org.eclipse.persistence.internal.oxm.NodeValue
org.eclipse.persistence.internal.oxm.MappingNodeValue
org.eclipse.persistence.internal.oxm.XMLRelationshipMappingNodeValue
org.eclipse.persistence.internal.oxm.XMLCompositeCollectionMappingNodeValue
- All Implemented Interfaces:
ContainerValue
public class XMLCompositeCollectionMappingNodeValue
extends XMLRelationshipMappingNodeValue
implements ContainerValue
INTERNAL:
Purpose: This is how the XML Composite Collection Mapping is handled when used with the TreeObjectBuilder.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionXMLCompositeCollectionMappingNodeValue(CompositeCollectionMapping xmlCompositeCollectionMapping) XMLCompositeCollectionMappingNodeValue(CompositeCollectionMapping xmlCompositeCollectionMapping, boolean isInverse) -
Method Summary
Modifier and TypeMethodDescriptionvoidendElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord) INTERNAL:voidendElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Object collection) intgetIndex()INTERNAL: Set to track the index of the corresponding containerInstance in the containerInstances Object[] on UnmarshalRecord Set during TreeObjectBuilder initializationReturn the mapping associated with this node value.booleanReturn true if the original container on the object should be used if present.booleanINTERNAL:booleanINTERNAL Return true if an empty container should be set on the object if there is no presence of the collection in the XML document.booleanFor media types that provide a native representation of collections (such as JSON arrays), can the representation be simplified so that the grouping element can be used as the collection name.booleanmarshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver) INTERNAL:booleanmarshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, Object value, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext) INTERNAL: This method provides an optimization in cases where the value has already been calculated.voidsetContainerInstance(Object object, Object containerInstance) voidsetIndex(int index) INTERNAL: Used to track the index of the corresponding containerInstance in the containerInstances Object[] on UnmarshalRecordprotected voidsetOrAddAttributeValue(UnmarshalRecord unmarshalRecord, Object value, XPathFragment xPathFragment, Object collection) booleanstartElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Attributes atts) INTERNAL:Methods inherited from class org.eclipse.persistence.internal.oxm.XMLRelationshipMappingNodeValue
addTypeAttribute, endElementProcessText, findReferenceDescriptor, getClassForQName, processChild, setOrAddAttributeValueForKeepAsElement, setupHandlerForKeepAsElementPolicy, writeExtraNamespacesMethods inherited from class org.eclipse.persistence.internal.oxm.MappingNodeValue
addTypeAttribute, isMappingNodeValue, updateNamespacesMethods inherited from class org.eclipse.persistence.internal.oxm.NodeValue
attribute, buildSelfRecord, endSelfNodeValue, getXPathNode, isAnyMappingNodeValue, isMarshalNodeValue, isMarshalOnlyNodeValue, isMixedContentNodeValue, isNullCapableValue, isOwningNode, isUnmarshalNodeValue, isWhitespaceAware, isWrapperNodeValue, marshal, marshal, marshal, marshalSelfAttributes, marshalSingleValue, setXPathNode
-
Constructor Details
-
XMLCompositeCollectionMappingNodeValue
public XMLCompositeCollectionMappingNodeValue(CompositeCollectionMapping xmlCompositeCollectionMapping) -
XMLCompositeCollectionMappingNodeValue
public XMLCompositeCollectionMappingNodeValue(CompositeCollectionMapping xmlCompositeCollectionMapping, boolean isInverse)
-
-
Method Details
-
marshal
public boolean marshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver) Description copied from class:NodeValueINTERNAL: -
startElement
public boolean startElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Attributes atts) Description copied from class:NodeValueINTERNAL:- Overrides:
startElementin classNodeValue
-
endElement
Description copied from class:NodeValueINTERNAL:- Overrides:
endElementin classNodeValue
-
endElement
public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Object collection) - Overrides:
endElementin classNodeValue
-
getContainerInstance
- Specified by:
getContainerInstancein interfaceContainerValue
-
setContainerInstance
- Specified by:
setContainerInstancein interfaceContainerValue
-
getContainerPolicy
- Specified by:
getContainerPolicyin interfaceContainerValue
-
isContainerValue
public boolean isContainerValue()Description copied from class:NodeValueINTERNAL:- Overrides:
isContainerValuein classNodeValue- Returns:
- Returns true if the NodeValue implements ContainerValue.
- See Also:
-
marshalSingleValue
public boolean marshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, Object value, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext) Description copied from class:NodeValueINTERNAL: This method provides an optimization in cases where the value has already been calculated.- Specified by:
marshalSingleValuein interfaceContainerValue- Specified by:
marshalSingleValuein classNodeValue
-
getMapping
Description copied from class:MappingNodeValueReturn the mapping associated with this node value.- Specified by:
getMappingin interfaceContainerValue- Specified by:
getMappingin classMappingNodeValue
-
setOrAddAttributeValue
protected void setOrAddAttributeValue(UnmarshalRecord unmarshalRecord, Object value, XPathFragment xPathFragment, Object collection) - Specified by:
setOrAddAttributeValuein classXMLRelationshipMappingNodeValue
-
getReuseContainer
public boolean getReuseContainer()Description copied from interface:ContainerValueReturn true if the original container on the object should be used if present. If it is not present then the container policy will be used to create the container.- Specified by:
getReuseContainerin interfaceContainerValue
-
setIndex
public void setIndex(int index) INTERNAL: Used to track the index of the corresponding containerInstance in the containerInstances Object[] on UnmarshalRecord- Specified by:
setIndexin interfaceContainerValue
-
getIndex
public int getIndex()INTERNAL: Set to track the index of the corresponding containerInstance in the containerInstances Object[] on UnmarshalRecord Set during TreeObjectBuilder initialization- Specified by:
getIndexin interfaceContainerValue
-
isDefaultEmptyContainer
public boolean isDefaultEmptyContainer()INTERNAL Return true if an empty container should be set on the object if there is no presence of the collection in the XML document.- Specified by:
isDefaultEmptyContainerin interfaceContainerValue- Since:
- EclipseLink 2.3.3
-
isWrapperAllowedAsCollectionName
public boolean isWrapperAllowedAsCollectionName()Description copied from interface:ContainerValueFor media types that provide a native representation of collections (such as JSON arrays), can the representation be simplified so that the grouping element can be used as the collection name.- Specified by:
isWrapperAllowedAsCollectionNamein interfaceContainerValue
-