Module org.eclipse.persistence.core
Interface MarshalContext
- All Known Implementing Classes:
ObjectMarshalContext
,SequencedMarshalContext
public interface MarshalContext
The MarshalContext allows mappings to be marshalled differently depending on
the type of object. For example POJOs are marshalled based on the order in
which mappings were added to the descriptor, while sequenced objects are based
on the order of their Setting objects.
-
Method Summary
Modifier and TypeMethodDescriptiongetAttributeValue
(Object object, Mapping mapping) 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
-
getMarshalContext
- Returns:
- Return the MarshalContext at the specified position.
-
getNonAttributeChildrenSize
- 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
- Returns:
- The non-attribute child at the specified index for the specified xPathNode.
-
getAttributeValue
- Returns:
- the attribute value corresponding to the object parameter.
-
marshal
boolean marshal(NodeValue nodeValue, XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver) Perform a marshal using the NodeValue parameter.- Returns:
- If anything as marshalled as a result of this call.
-
marshal
boolean marshal(NodeValue nodeValue, XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver, XPathFragment rootFragment)
-