Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.openjpa.kernel
Class OpenJPASavepoint

    java.lang.Object
      org.apache.openjpa.kernel.OpenJPASavepoint

Direct Known Subclasses:
  AbstractJDBCSavepointManager.ConnectionSavepoint

    public class OpenJPASavepoint

extends Object

Represents a savepoint where operations afterwards can be rolled back and restored to this point

Since:
  0.3.4
Author:
  Steve Kim

Constructor Summary
`OpenJPASavepoint(Broker broker, String name, boolean copy)` Constructor.

Method Summary
`Broker` | `getBroker()` Return the Broker associated with this savepoint.
`boolean` | `getCopyFieldState()` Whether this savepoint copies the field values of retained instances.
`String` | `getName()` Return the name for this savepoint.
`protected Map` | `getStates()` Return the map of states to savepoint data.
`void` | `release(boolean user)` Release this savepoint and any associated resources.
`Collection` | `rollback(Collection previous)` Handle the rolled back state, returning saved data.
`void` | `save(Collection states)` Set this savepoint, saving any state for the passed-in `OpenJPAStateManager`s as necessary.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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 getStates()

  Return the map of states to savepoint data.

### save

    public void save(Collection states)

  Set this savepoint, saving any state for the passed-in `OpenJPAStateManager`s as necessary.

### 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 rollback(Collection 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 Apache Software Foundation. All Rights Reserved.