Class DetachState


  • public class DetachState
    extends FetchPlanState
    Holder for the detachment state control for the detachment process.
    • Field Detail

      • detachedObjectById

        private java.util.Map<java.lang.Object,​DetachState.Entry> detachedObjectById
        a map for the current execution of detachCopy with detached objects keyed by the object id
      • api

        private ApiAdapter api
        Adapter for the API being used.
    • Constructor Detail

      • DetachState

        public DetachState​(ApiAdapter api)
        Constructor.
        Parameters:
        api - The API adapter
    • Method Detail

      • setDetachedCopyEntry

        public void setDetachedCopyEntry​(java.lang.Object pc,
                                         java.lang.Object detachedPC)
        Set to the current state a detached copy object
        Parameters:
        pc - The persistable object
        detachedPC - the Detached persistable object
      • getDetachedCopyEntry

        public DetachState.Entry getDetachedCopyEntry​(java.lang.Object pc)
        Get any existing detached copy object for the passed in persistable
        Parameters:
        pc - the persistable object
        Returns:
        the Detached PC
      • getKey

        private java.lang.Object getKey​(java.lang.Object pc)