Module org.eclipse.persistence.core
Class XMLCollectionReferenceMappingMarshalNodeValue
- java.lang.Object
-
- org.eclipse.persistence.internal.oxm.NodeValue
-
- org.eclipse.persistence.internal.oxm.MappingNodeValue
-
- org.eclipse.persistence.internal.oxm.XMLCollectionReferenceMappingMarshalNodeValue
-
- All Implemented Interfaces:
ContainerValue
public class XMLCollectionReferenceMappingMarshalNodeValue extends MappingNodeValue implements ContainerValue
-
-
Constructor Summary
Constructors Constructor Description XMLCollectionReferenceMappingMarshalNodeValue(CollectionReferenceMapping xmlCollectionReferenceMapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetContainerInstance()CoreContainerPolicygetContainerPolicy()intgetIndex()INTERNAL: Set to track the index of the corresponding containerInstance in the containerInstances Object[] on UnmarshalRecord Set during TreeObjectBuilder initializationCollectionReferenceMappinggetMapping()Return the mapping associated with this node value.booleangetReuseContainer()Return true if the original container on the object should be used if present.booleanisDefaultEmptyContainer()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.booleanisMarshalNodeValue()booleanisOwningNode(XPathFragment fragment)INTERNAL:booleanisUnmarshalNodeValue()booleanisWrapperAllowedAsCollectionName()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.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 UnmarshalRecord-
Methods inherited from class org.eclipse.persistence.internal.oxm.MappingNodeValue
addTypeAttribute, isMappingNodeValue, updateNamespaces
-
Methods inherited from class org.eclipse.persistence.internal.oxm.NodeValue
attribute, buildSelfRecord, endElement, endElement, endSelfNodeValue, getXPathNode, isAnyMappingNodeValue, isContainerValue, isMarshalOnlyNodeValue, isMixedContentNodeValue, isNullCapableValue, isWhitespaceAware, isWrapperNodeValue, marshal, marshal, marshal, marshalSelfAttributes, marshalSingleValue, setXPathNode, startElement
-
-
-
-
Constructor Detail
-
XMLCollectionReferenceMappingMarshalNodeValue
public XMLCollectionReferenceMappingMarshalNodeValue(CollectionReferenceMapping xmlCollectionReferenceMapping)
-
-
Method Detail
-
isOwningNode
public boolean isOwningNode(XPathFragment fragment)
Description copied from class:NodeValueINTERNAL:- Overrides:
isOwningNodein classNodeValue
-
getContainerInstance
public Object getContainerInstance()
- Specified by:
getContainerInstancein interfaceContainerValue
-
getContainerPolicy
public CoreContainerPolicy getContainerPolicy()
- Specified by:
getContainerPolicyin interfaceContainerValue
-
getMapping
public CollectionReferenceMapping getMapping()
Description copied from class:MappingNodeValueReturn the mapping associated with this node value.- Specified by:
getMappingin interfaceContainerValue- Specified by:
getMappingin classMappingNodeValue
-
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
-
setContainerInstance
public void setContainerInstance(Object object, Object containerInstance)
- Specified by:
setContainerInstancein interfaceContainerValue
-
marshal
public boolean marshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver)
Description copied from class:NodeValueINTERNAL:
-
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
-
isMarshalNodeValue
public boolean isMarshalNodeValue()
- Overrides:
isMarshalNodeValuein classNodeValue
-
isUnmarshalNodeValue
public boolean isUnmarshalNodeValue()
- Overrides:
isUnmarshalNodeValuein classNodeValue
-
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
-
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
-
-