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 CallbackContext<T>

Type Parameters:
  `T` - the type of element that the callback is acting on.

All Known Implementing Classes:
  DeleteContext, PutContext

    public interface CallbackContext<T>

Describes the context in which a callback runs. The context has access to the current transaction (if any), the element that the callback is operating on (eg the Entity being put or the Key being deleted), as well as all elements being operated on in the operation that triggered the callback..

Method Summary
`T` | `getCurrentElement()`
`int` | `getCurrentIndex()`
`Transaction` | `getCurrentTransaction()`
`java.util.List<T>` | `getElements()`

Method Detail

### getElements

    java.util.List<T> getElements()

  Returns:
    An unmodifiable view of the elements involved in the operation that triggered the callback..

### getCurrentTransaction

    Transaction getCurrentTransaction()

  Returns:
    The current transaction, or `null` if there is no current transaction.

### getCurrentIndex

    int getCurrentIndex()

  Returns:
    The index in the result of `getElements()` of the element for which the callback has been invoked.

### getCurrentElement

    T getCurrentElement()

  Returns:
    The element for which the callback has been invoked. Shortcut for `getElements().getCurrentIndex()`.

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