Module org.eclipse.persistence.core
Class ObjectMarshalContext
java.lang.Object
org.eclipse.persistence.internal.oxm.record.ObjectMarshalContext
- All Implemented Interfaces:
MarshalContext
An implementation of MarshalContext for handling plain old java objects that
are mapped to XML.
-
Method Summary
Modifier and TypeMethodDescriptiongetAttributeValue
(Object object, Mapping mapping) static ObjectMarshalContext
getMarshalContext
(int index) getNonAttributeChild
(int index, XPathNode xPathNode) int
getNonAttributeChildrenSize
(XPathNode xPathNode) boolean
marshal
(NodeValue nodeValue, XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver) Perform a marshal using the NodeValue parameter.boolean
marshal
(NodeValue nodeValue, XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver, XPathFragment rootFragment)
-
Method Details
-
getInstance
-
getMarshalContext
- Specified by:
getMarshalContext
in interfaceMarshalContext
- Returns:
- Return the MarshalContext at the specified position.
-
getNonAttributeChildrenSize
- Specified by:
getNonAttributeChildrenSize
in interfaceMarshalContext
- Returns:
- The number of non-attribute children. For POJOs this is based on the number of non-attribute mappings, and for sequenced objects this is based on the number of Setting objects.
-
getNonAttributeChild
- Specified by:
getNonAttributeChild
in interfaceMarshalContext
- Returns:
- The non-attribute child at the specified index for the specified xPathNode.
-
getAttributeValue
- Specified by:
getAttributeValue
in interfaceMarshalContext
- Returns:
- the attribute value corresponding to the object parameter.
-
marshal
public boolean marshal(NodeValue nodeValue, XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver) Description copied from interface:MarshalContext
Perform a marshal using the NodeValue parameter.- Specified by:
marshal
in interfaceMarshalContext
- Returns:
- If anything as marshalled as a result of this call.
-
marshal
public boolean marshal(NodeValue nodeValue, XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver, XPathFragment rootFragment) - Specified by:
marshal
in interfaceMarshalContext
-