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

## com.google.appengine.api.datastore
Interface Transaction

    public interface Transaction

Describes a logical unit of work to be performed against the datastore. Operations performed as part of a single `Transaction` succeed or fail as a unit.

Method Summary
`void` | `commit()` Commits the transaction.
`java.lang.String` | `getId()`
`void` | `rollback()` Rolls back the transaction.

Method Detail

### commit

    void commit()

  Commits the transaction. Whether this call succeeds or fails, all subsequent method invocations on this object will throw `IllegalStateException`.

  Throws:
    `java.lang.IllegalStateException` - If the transaction has already been committed, rolled back, or an attempt to commit or roll back has already failed.
    `DatastoreFailureException` - If a datastore error occurs.

### rollback

    void rollback()

  Rolls back the transaction. Whether this call succeeds or fails, all subsequent method invocations on this object will throw `IllegalStateException`.

  Throws:
    `java.lang.IllegalStateException` - If the transaction has already been committed, rolled back, or an attempt to commit or roll back has already failed.
    `DatastoreFailureException` - If a datastore error occurs.

### getId

    java.lang.String getId()

  Returns:
    The globally unique identifier for the `Transaction`.

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