Class DescriptorLevelDocumentPreservationPolicy
- java.lang.Object
-
- org.eclipse.persistence.oxm.documentpreservation.DocumentPreservationPolicy
-
- org.eclipse.persistence.internal.oxm.documentpreservation.DescriptorLevelDocumentPreservationPolicy
-
public class DescriptorLevelDocumentPreservationPolicy extends DocumentPreservationPolicy
INTERNAL:Purpose:Provide an implementation of DocumentPreservation Policy that accesses the session cache to store Objects and their associated nodes.
Responsibilities:
- Add new objects and their associated nodes into the Session cache, wrapping them in a weak reference.
- Lookup the node for a given Object
- Since:
- TopLink 11g
- Author:
- mmacivor
-
-
Field Summary
Fields Modifier and Type Field Description protected Map
nodesToObjects
protected Map
objectsToNodes
-
Constructor Summary
Constructors Constructor Description DescriptorLevelDocumentPreservationPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addObjectToCache(Object obj, Node node)
void
addObjectToCache(Object obj, Node node, Mapping selfRecordMapping)
Node
getNodeForObject(Object obj)
Object
getObjectForNode(Node node)
Object
getObjectForNode(Node node, Mapping selfRecordMapping)
boolean
shouldPreserveDocument()
-
Methods inherited from class org.eclipse.persistence.oxm.documentpreservation.DocumentPreservationPolicy
getNodeOrderingPolicy, initialize, setNodeOrderingPolicy
-
-
-
-
Method Detail
-
addObjectToCache
public void addObjectToCache(Object obj, Node node)
- Specified by:
addObjectToCache
in classDocumentPreservationPolicy
-
addObjectToCache
public void addObjectToCache(Object obj, Node node, Mapping selfRecordMapping)
- Specified by:
addObjectToCache
in classDocumentPreservationPolicy
-
getNodeForObject
public Node getNodeForObject(Object obj)
- Specified by:
getNodeForObject
in classDocumentPreservationPolicy
-
getObjectForNode
public Object getObjectForNode(Node node)
- Specified by:
getObjectForNode
in classDocumentPreservationPolicy
-
getObjectForNode
public Object getObjectForNode(Node node, Mapping selfRecordMapping)
- Specified by:
getObjectForNode
in classDocumentPreservationPolicy
-
shouldPreserveDocument
public boolean shouldPreserveDocument()
- Specified by:
shouldPreserveDocument
in classDocumentPreservationPolicy
-
-