Class ObjectMarshalContext
- java.lang.Object
-
- org.eclipse.persistence.internal.oxm.record.ObjectMarshalContext
-
- All Implemented Interfaces:
MarshalContext
public class ObjectMarshalContext extends java.lang.Object implements MarshalContext
An implementation of MarshalContext for handling plain old java objects that are mapped to XML.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetAttributeValue(java.lang.Object object, Mapping mapping)static ObjectMarshalContextgetInstance()MarshalContextgetMarshalContext(int index)java.lang.ObjectgetNonAttributeChild(int index, XPathNode xPathNode)intgetNonAttributeChildrenSize(XPathNode xPathNode)booleanmarshal(NodeValue nodeValue, XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver)Perform a marshal using the NodeValue parameter.booleanmarshal(NodeValue nodeValue, XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver, XPathFragment rootFragment)
-
-
-
Method Detail
-
getInstance
public static ObjectMarshalContext getInstance()
-
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 java.lang.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 java.lang.Object getAttributeValue(java.lang.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, java.lang.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, java.lang.Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver, XPathFragment rootFragment)
- Specified by:
marshalin interfaceMarshalContext
-
-