Module org.eclipse.persistence.core
Class SequencedMarshalContext
- java.lang.Object
-
- org.eclipse.persistence.internal.oxm.record.SequencedMarshalContext
-
- All Implemented Interfaces:
MarshalContext
public class SequencedMarshalContext extends Object implements MarshalContext
An implementation of MarshalContext for handling sequenced objects that are mapped to XML.
-
-
Constructor Summary
Constructors Constructor Description SequencedMarshalContext(Object value)SequencedMarshalContext(List<Setting> settings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetAttributeValue(Object object, Mapping mapping)MarshalContextgetMarshalContext(int index)ObjectgetNonAttributeChild(int index, XPathNode xPathNode)intgetNonAttributeChildrenSize(XPathNode xPathNode)booleanmarshal(NodeValue nodeValue, XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver)Perform a marshal using the NodeValue parameter.booleanmarshal(NodeValue nodeValue, XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver, XPathFragment rootFragment)
-
-
-
Method Detail
-
getMarshalContext
public MarshalContext getMarshalContext(int index)
- Specified by:
getMarshalContextin interfaceMarshalContext- Returns:
- Return the MarshalContext at the specified position.
-
getNonAttributeChildrenSize
public int getNonAttributeChildrenSize(XPathNode xPathNode)
- Specified by:
getNonAttributeChildrenSizein 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
public Object getNonAttributeChild(int index, XPathNode xPathNode)
- Specified by:
getNonAttributeChildin interfaceMarshalContext- Returns:
- The non-attribute child at the specified index for the specified xPathNode.
-
getAttributeValue
public Object getAttributeValue(Object object, Mapping mapping)
- Specified by:
getAttributeValuein 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:MarshalContextPerform a marshal using the NodeValue parameter.- Specified by:
marshalin 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:
marshalin interfaceMarshalContext
-
-