Package org.apache.cayenne.tx

# Class TransactionDescriptor.Builder

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

Enclosing class:
  `TransactionDescriptor`

public static class TransactionDescriptor.Builder extends Object
Builder class for the TransactionDescriptor.

Since:
  4.2

- ## Method Summary

  Modifier and Type
  Method
  Description
  `TransactionDescriptor`
  `build()`
  `TransactionDescriptor.Builder`
  `connection(Connection connection)`
  A custom connection provided by the TransactionDescriptor will be used instead of any other connection provided by tbe connection pool.
  `TransactionDescriptor.Builder`
  `connectionSupplier(Supplier<Connection> connectionSupplier)`
  A custom connection provided by the TransactionDescriptor will be used instead of any other connection provided by tbe connection pool.
  `TransactionDescriptor.Builder`
  `isolation(int isolation)`
  `TransactionDescriptor.Builder`
  `propagation(TransactionPropagation propagation)`

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

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

- ## Method Details

  - ### isolation

    public TransactionDescriptor.Builder isolation(int isolation)
    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`

  - ### connection

    public TransactionDescriptor.Builder connection(Connection connection)
    A custom connection provided by the TransactionDescriptor will be used instead of any other connection provided by tbe connection pool.
    Parameters:
      `connection` - custom connection
    See Also:
      - `connectionSupplier(Supplier)`

  - ### connectionSupplier

    public TransactionDescriptor.Builder connectionSupplier(Supplier<Connection> connectionSupplier)
    A custom connection provided by the TransactionDescriptor will be used instead of any other connection provided by tbe connection pool.
    Parameters:
      `connectionSupplier` - custom connection supplier
    See Also:
      - `connection(Connection)`

  - ### propagation

    public TransactionDescriptor.Builder propagation(TransactionPropagation propagation)
    Parameters:
      `propagation` - transaction propagation behaviour
    See Also:
      - `TransactionPropagation`

  - ### build

    public TransactionDescriptor build()