Package org.apache.cayenne.tx

## Class TransactionDescriptor

- java.lang.Object
- - org.apache.cayenne.tx.TransactionDescriptor

- Direct Known Subclasses:
    `DefaultTransactionDescriptor`

      public class TransactionDescriptor
      extends Object

  Descriptor that provide desired transaction isolation level and propagation logic.
  Since:
    4.1

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `ISOLATION_DEFAULT` | Keep database default isolation level

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TransactionDescriptor​(int isolation)` | Create transaction descriptor with desired isolation level and `NESTED` propagation
    `TransactionDescriptor​(int isolation, TransactionPropagation propagation)` |
    `TransactionDescriptor​(TransactionPropagation propagation)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `getIsolation()` |
    `TransactionPropagation` | `getPropagation()` |

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

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

- - ### Field Detail

    - #### ISOLATION_DEFAULT

          public static final int ISOLATION_DEFAULT

      Keep database default isolation level
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TransactionDescriptor

          public TransactionDescriptor​(int isolation,
                                       TransactionPropagation propagation)

      Parameters:
        `isolation` - one of the following `Connection` constants: `Connection.TRANSACTION_READ_UNCOMMITTED`, `Connection.TRANSACTION_READ_COMMITTED`, `Connection.TRANSACTION_REPEATABLE_READ`, `Connection.TRANSACTION_SERIALIZABLE`, or `TransactionDescriptor.ISOLATION_DEFAULT`
        `propagation` - transaction propagation behaviour
      See Also:
        `TransactionPropagation`

    - #### TransactionDescriptor

          public TransactionDescriptor​(int isolation)

      Create transaction descriptor with desired isolation level and `NESTED` propagation
      Parameters:
        `isolation` - one of the following `Connection` constants: `Connection.TRANSACTION_READ_UNCOMMITTED`, `Connection.TRANSACTION_READ_COMMITTED`, `Connection.TRANSACTION_REPEATABLE_READ`, `Connection.TRANSACTION_SERIALIZABLE`, or `TransactionDescriptor.ISOLATION_DEFAULT`

    - #### TransactionDescriptor

          public TransactionDescriptor​(TransactionPropagation propagation)

      Parameters:
        `propagation` - transaction propagation behaviour
      See Also:
        `TransactionPropagation`

  - ### Method Detail

    - #### getIsolation

          public int getIsolation()

      Returns:
        required isolation level

    - #### getPropagation

          public TransactionPropagation getPropagation()

      Returns:
        required propagation behaviour