- java.lang.Object
-
- org.eclipse.persistence.sdo.helper.SDOMarshalListener
-
- All Implemented Interfaces:
org.eclipse.persistence.internal.oxm.Marshaller.Listener,XMLMarshalListener
public class SDOMarshalListener extends Object implements XMLMarshalListener
Purpose: Implementation of XMLMarshalListener used when marshalling DataObjects to XML
Responsibilities:
- Need to do extra work to marshal org.eclipse.persistence.sdo.SDOChangeSummary objects
-
-
Constructor Summary
Constructors Constructor Description SDOMarshalListener(XMLMarshaller aMarshaller, SDOTypeHelper aTypeHelper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterMarshal(Object obj)This event will be called after an object is marshalled.voidbeforeMarshal(Object obj)This event will be called before an object is marshalled.ObjectgetMarshalledObject()QNamegetMarshalledObjectRootQName()StringgetPathFromAncestor(SDODataObject sourceDO, SDODataObject targetDO, SDOChangeSummary cs)INTERNAL: Get path for non-deleted DataObjects
ChangeSummary is not required and is set to null.
Assumptions:
target node is an ancestor of the source (this)MarshalRecordgetRootMarshalRecord()voidsetMarshalledObject(Object marshalledObject)voidsetMarshalledObjectRootQName(QName rootQName)voidsetRootMarshalRecord(MarshalRecord rootRecord)
-
-
-
Constructor Detail
-
SDOMarshalListener
public SDOMarshalListener(XMLMarshaller aMarshaller, SDOTypeHelper aTypeHelper)
-
-
Method Detail
-
afterMarshal
public void afterMarshal(Object obj)
Description copied from interface:org.eclipse.persistence.internal.oxm.Marshaller.ListenerThis event will be called after an object is marshalled.- Specified by:
afterMarshalin interfaceorg.eclipse.persistence.internal.oxm.Marshaller.Listener- Parameters:
obj- The object that was marshalled.
-
beforeMarshal
public void beforeMarshal(Object obj)
Description copied from interface:org.eclipse.persistence.internal.oxm.Marshaller.ListenerThis event will be called before an object is marshalled.- Specified by:
beforeMarshalin interfaceorg.eclipse.persistence.internal.oxm.Marshaller.Listener- Parameters:
obj- The object that will be marshalled.
-
setMarshalledObject
public void setMarshalledObject(Object marshalledObject)
-
getMarshalledObject
public Object getMarshalledObject()
-
setMarshalledObjectRootQName
public void setMarshalledObjectRootQName(QName rootQName)
-
getMarshalledObjectRootQName
public QName getMarshalledObjectRootQName()
-
setRootMarshalRecord
public void setRootMarshalRecord(MarshalRecord rootRecord)
-
getRootMarshalRecord
public MarshalRecord getRootMarshalRecord()
-
getPathFromAncestor
public String getPathFromAncestor(SDODataObject sourceDO, SDODataObject targetDO, SDOChangeSummary cs)
INTERNAL: Get path for non-deleted DataObjects
ChangeSummary is not required and is set to null.
Assumptions:
target node is an ancestor of the source (this)- Parameters:
sourceDO-targetDO-- Returns:
- String xpath
-
-