Class JPACallbackHandler

  • All Implemented Interfaces:
    org.datanucleus.state.CallbackHandler

    public class JPACallbackHandler
    extends Object
    implements org.datanucleus.state.CallbackHandler
    CallbackHandler implementation for JPA.
    • Constructor Detail

      • JPACallbackHandler

        public JPACallbackHandler​(org.datanucleus.ExecutionContext ec)
    • Method Detail

      • prePersist

        public void prePersist​(Object pc)
        Callback before the object is persisted (just before the lifecycle state change).
        Specified by:
        prePersist in interface org.datanucleus.state.CallbackHandler
        Parameters:
        pc - The Object
      • preStore

        public void preStore​(Object pc)
        Callback before the object is stored.
        Specified by:
        preStore in interface org.datanucleus.state.CallbackHandler
        Parameters:
        pc - The Object
      • postStore

        public void postStore​(Object pc)
        Callback after the object is stored.
        Specified by:
        postStore in interface org.datanucleus.state.CallbackHandler
        Parameters:
        pc - The Object
      • preDelete

        public void preDelete​(Object pc)
        Callback before the object is deleted (after calling remove() but before the lifecycle state change).
        Specified by:
        preDelete in interface org.datanucleus.state.CallbackHandler
        Parameters:
        pc - The Object
      • postDelete

        public void postDelete​(Object pc)
        Callback after the object is deleted.
        Specified by:
        postDelete in interface org.datanucleus.state.CallbackHandler
        Parameters:
        pc - The Object
      • postLoad

        public void postLoad​(Object pc)
        Callback after the fields of the object are loaded.
        Specified by:
        postLoad in interface org.datanucleus.state.CallbackHandler
        Parameters:
        pc - The Object
      • addListener

        public void addListener​(Object listener,
                                Class[] classes)
        Adds a new listener to this handler.
        Specified by:
        addListener in interface org.datanucleus.state.CallbackHandler
        Parameters:
        listener - the listener instance.
        classes - this parameter is ignored in this implementation
      • removeListener

        public void removeListener​(Object listener)
        Remove a listener for this handler.
        Specified by:
        removeListener in interface org.datanucleus.state.CallbackHandler
        Parameters:
        listener - the listener instance
      • close

        public void close()
        Clear any objects to release resources.
        Specified by:
        close in interface org.datanucleus.state.CallbackHandler