com.holonplatform.datastore.jpa.tx

## Interface JpaTransactionFactory

- Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

      @FunctionalInterface
      public interface JpaTransactionFactory

  Factory to create and configure new `JpaTransaction` implementation using an `EntityManager` and a `TransactionConfiguration` definition.
  Since:
    5.2.0

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `JpaTransaction` | `createTransaction(javax.persistence.EntityManager entityManager, com.holonplatform.core.datastore.transaction.TransactionConfiguration configuration)` Build a new `JpaTransaction`.
    `static JpaTransactionFactory` | `getDefault()` Get the default `JpaTransactionFactory`.

- - ### Method Detail

    - #### createTransaction

          JpaTransaction createTransaction(javax.persistence.EntityManager entityManager,
                                           com.holonplatform.core.datastore.transaction.TransactionConfiguration configuration)
                                    throws com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionException

      Build a new `JpaTransaction`.
      Parameters:
        `entityManager` - The `EntityManager` to use (not null)
        `configuration` - Configuration (not null)
      Returns:
        A new `JpaTransaction` (not null)
      Throws:
        `com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionException` - If an error occurred

    - #### getDefault

          static JpaTransactionFactory getDefault()

      Get the default `JpaTransactionFactory`.
      Returns:
        the default `JpaTransactionFactory`

Copyright © 2019 The Holon Platform. All rights reserved.