Class OpenJPASavepoint

    • Constructor Detail

      • OpenJPASavepoint

        public OpenJPASavepoint​(Broker broker,
                                String name,
                                boolean copy)
        Constructor. Indicate whether to copy field data into memory.
    • Method Detail

      • getBroker

        public Broker getBroker()
        Return the Broker associated with this savepoint.
      • getName

        public String getName()
        Return the name for this savepoint.
      • getCopyFieldState

        public boolean getCopyFieldState()
        Whether this savepoint copies the field values of retained instances.
      • getStates

        protected Map<StateManagerImpl,​org.apache.openjpa.kernel.SavepointFieldManager> getStates()
        Return the map of states to savepoint data.
      • release

        public void release​(boolean user)
        Release this savepoint and any associated resources. Releases will happen in reverse order of creation.
        Parameters:
        user - if true, user initiated, otherwise a side effect of another savepoint's release/rollback
      • rollback

        public Collection<org.apache.openjpa.kernel.SavepointFieldManager> rollback​(Collection<OpenJPASavepoint> previous)
        Handle the rolled back state, returning saved data. Subclasses should return the collection returned from this method.
        Parameters:
        previous - previous savepoints set in the transaction