Interface MarshalContext
-
- All Known Implementing Classes:
ObjectMarshalContext,SequencedMarshalContext
public interface MarshalContextThe 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ObjectgetAttributeValue(java.lang.Object object, Mapping mapping)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
-
getMarshalContext
MarshalContext getMarshalContext(int index)
- Returns:
- Return the MarshalContext at the specified position.
-
getNonAttributeChildrenSize
int getNonAttributeChildrenSize(XPathNode xPathNode)
- 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
java.lang.Object getNonAttributeChild(int index, XPathNode xPathNode)- Returns:
- The non-attribute child at the specified index for the specified xPathNode.
-
getAttributeValue
java.lang.Object getAttributeValue(java.lang.Object object, Mapping mapping)- Returns:
- the attribute value corresponding to the object parameter.
-
marshal
boolean marshal(NodeValue nodeValue, XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.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, java.lang.Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver, XPathFragment rootFragment)
-
-