org.eclipse.net4j.util.transaction

## Class Transaction<CONTEXT>

- java.lang.Object
- - org.eclipse.net4j.util.transaction.Transaction<CONTEXT>

- All Implemented Interfaces:
    ITransaction<CONTEXT>

      public class Transaction<CONTEXT>
      extends Object
      implements ITransaction<CONTEXT>

  Author:
    Eike Stepper

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Transaction(CONTEXT context)`
    `Transaction(CONTEXT context, boolean undoPhase1OnRollback)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `commit()`
    `void` | `execute(ITransactionalOperation<CONTEXT> operation)`
    `CONTEXT` | `getContext()`
    `boolean` | `isActive()`
    `boolean` | `isUndoPhase1OnRollback()`
    `void` | `rollback()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Transaction

          public Transaction(CONTEXT context,
                             boolean undoPhase1OnRollback)

    - #### Transaction

          public Transaction(CONTEXT context)

  - ### Method Detail

    - #### isUndoPhase1OnRollback

          public boolean isUndoPhase1OnRollback()

    - #### isActive

          public boolean isActive()

      Specified by:
        `isActive` in interface `ITransaction<CONTEXT>`

    - #### getContext

          public CONTEXT getContext()

      Specified by:
        `getContext` in interface `ITransaction<CONTEXT>`

    - #### execute

          public void execute(ITransactionalOperation<CONTEXT> operation)
                       throws TransactionException

      Specified by:
        `execute` in interface `ITransaction<CONTEXT>`
      Throws:
        `TransactionException`

    - #### commit

          public void commit()

      Specified by:
        `commit` in interface `ITransaction<CONTEXT>`

    - #### rollback

          public void rollback()

      Specified by:
        `rollback` in interface `ITransaction<CONTEXT>`

Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html