Module eclipselink

Class DocumentPreservationPolicy


  • public abstract class DocumentPreservationPolicy
    extends Object
    Purpose:Provides an interface for customizing how Documents are preserved.

    Responsibilities:

    • Access objects from the cache based on node
    • Access nodes from the cache based on Object
    • Add objects and nodes to the cache
    • Allow the configuration of how nodes are added into the preserved doc
    Author:
    mmacivor
    Since:
    Oracle TopLink 11g
    • Constructor Detail

      • DocumentPreservationPolicy

        protected DocumentPreservationPolicy()
        Default constructor.
    • Method Detail

      • addObjectToCache

        public abstract void addObjectToCache​(Object obj,
                                              Node node)
      • addObjectToCache

        public abstract void addObjectToCache​(Object obj,
                                              Node node,
                                              org.eclipse.persistence.internal.oxm.mappings.Mapping selfRecordMapping)
        Since:
        EclipseLink 2.5.0
      • getNodeForObject

        public abstract Node getNodeForObject​(Object obj)
      • getObjectForNode

        public abstract Object getObjectForNode​(Node node)
      • getObjectForNode

        public abstract Object getObjectForNode​(Node node,
                                                org.eclipse.persistence.internal.oxm.mappings.Mapping selfRecordMapping)
      • shouldPreserveDocument

        public abstract boolean shouldPreserveDocument()
      • initialize

        public void initialize​(org.eclipse.persistence.internal.oxm.Context context)
        INTERNAL