Package 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 java.lang.Object
      implements ITransaction<CONTEXT>

  Author:
    Eike Stepper

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Transaction​(CONTEXT context)` |
    `Transaction​(CONTEXT context, boolean undoPhase1OnRollback)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | 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>`