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 Object implements ITransaction<CONTEXT>

Author:
  Eike Stepper

## Constructor Summary

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

## Method Summary

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 Details

### Transaction

public Transaction(CONTEXT context, boolean undoPhase1OnRollback)

### Transaction

public Transaction(CONTEXT context)

## Method Details

### 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>`