Module org.eclipse.persistence.core
Class XMLCompositeDirectCollectionMappingNodeValue
java.lang.Object
org.eclipse.persistence.internal.oxm.NodeValue
org.eclipse.persistence.internal.oxm.MappingNodeValue
org.eclipse.persistence.internal.oxm.XMLCompositeDirectCollectionMappingNodeValue
- All Implemented Interfaces:
ContainerValue
public class XMLCompositeDirectCollectionMappingNodeValue
extends MappingNodeValue
implements ContainerValue
INTERNAL:
Purpose: This is how the XML Composite Direct Collection Mapping is handled when used with the TreeObjectBuilder.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionXMLCompositeDirectCollectionMappingNodeValue
(DirectCollectionMapping xmlCompositeDirectCollectionMapping) -
Method Summary
Modifier and TypeMethodDescriptionvoid
attribute
(UnmarshalRecord unmarshalRecord, String namespaceURI, String localName, String value) INTERNAL:void
endElement
(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord) INTERNAL:void
endElement
(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Object collection) int
getIndex()
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.boolean
Return true if the original container on the object should be used if present.boolean
INTERNAL:boolean
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.boolean
isOwningNode
(XPathFragment xPathFragment) INTERNAL:boolean
boolean
For 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.boolean
marshal
(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver) Override the method in XPathNode such that the marshaller can be set on the marshalRecord - this is required for XMLConverter usage.boolean
marshalSingleValue
(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.void
setContainerInstance
(Object object, Object containerInstance) void
setIndex
(int index) INTERNAL: Used to track the index of the corresponding containerInstance in the containerInstances Object[] on UnmarshalRecordboolean
startElement
(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Attributes atts) INTERNAL:Methods inherited from class org.eclipse.persistence.internal.oxm.MappingNodeValue
addTypeAttribute, isMappingNodeValue, updateNamespaces
Methods inherited from class org.eclipse.persistence.internal.oxm.NodeValue
buildSelfRecord, endSelfNodeValue, getXPathNode, isAnyMappingNodeValue, isMarshalNodeValue, isMarshalOnlyNodeValue, isMixedContentNodeValue, isNullCapableValue, isUnmarshalNodeValue, isWrapperNodeValue, marshal, marshal, marshal, marshalSelfAttributes, marshalSingleValue, setXPathNode
-
Constructor Details
-
XMLCompositeDirectCollectionMappingNodeValue
public XMLCompositeDirectCollectionMappingNodeValue(DirectCollectionMapping xmlCompositeDirectCollectionMapping)
-
-
Method Details
-
isOwningNode
Description copied from class:NodeValue
INTERNAL:- Overrides:
isOwningNode
in classNodeValue
-
marshal
public boolean marshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver) Override the method in XPathNode such that the marshaller can be set on the marshalRecord - this is required for XMLConverter usage. -
attribute
public void attribute(UnmarshalRecord unmarshalRecord, String namespaceURI, String localName, String value) Description copied from class:NodeValue
INTERNAL: -
startElement
public boolean startElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Attributes atts) Description copied from class:NodeValue
INTERNAL:- Overrides:
startElement
in classNodeValue
-
endElement
Description copied from class:NodeValue
INTERNAL:- Overrides:
endElement
in classNodeValue
-
endElement
public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Object collection) - Overrides:
endElement
in classNodeValue
-
getContainerInstance
- Specified by:
getContainerInstance
in interfaceContainerValue
-
setContainerInstance
- Specified by:
setContainerInstance
in interfaceContainerValue
-
getContainerPolicy
- Specified by:
getContainerPolicy
in interfaceContainerValue
-
isContainerValue
public boolean isContainerValue()Description copied from class:NodeValue
INTERNAL:- Overrides:
isContainerValue
in 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:NodeValue
INTERNAL: This method provides an optimization in cases where the value has already been calculated.- Specified by:
marshalSingleValue
in interfaceContainerValue
- Specified by:
marshalSingleValue
in classNodeValue
-
getMapping
Description copied from class:MappingNodeValue
Return the mapping associated with this node value.- Specified by:
getMapping
in interfaceContainerValue
- Specified by:
getMapping
in classMappingNodeValue
-
isWhitespaceAware
public boolean isWhitespaceAware()- Overrides:
isWhitespaceAware
in classNodeValue
-
getReuseContainer
public boolean getReuseContainer()Description copied from interface:ContainerValue
Return 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:
getReuseContainer
in 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:
setIndex
in 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:
getIndex
in 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:
isDefaultEmptyContainer
in interfaceContainerValue
- Since:
- EclipseLink 2.3.3
-
isWrapperAllowedAsCollectionName
public boolean isWrapperAllowedAsCollectionName()Description copied from interface:ContainerValue
For 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:
isWrapperAllowedAsCollectionName
in interfaceContainerValue
-