com.isomorphic.jpa

## Class JPAConnectionHolder

- com.isomorphic.jpa.JPAConnectionHolder

-     public class JPAConnectionHolder

  Holds `EntityManager` and current transaction. Instance of this class is used to store connection information in `RPCManager` while handling Automatic Transactions.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.persistence.EntityManager` | `getEntityManager()` Returns `EntityManager` for this connection.
    `int` | `getOpCount()` Returns count of operations executed.
    `java.lang.Object` | `getTransaction()` Returns current open transaction.
    `void` | `increaseOpCount()` Increases operations count by 1.
    `void` | `setEntityManager(javax.persistence.EntityManager em)` Sets new `EntityManager`.
    `void` | `setTransaction(java.lang.Object tx)` Sets new transaction.

- - ### Method Detail

    - #### getEntityManager

          public javax.persistence.EntityManager getEntityManager()

      Returns `EntityManager` for this connection.
      Returns:
        `EntityManager` for this connection.

    - #### setEntityManager

          public void setEntityManager(javax.persistence.EntityManager em)

      Sets new `EntityManager`.
      Parameters:
        `em` - `EntityManager` new entity manager.

    - #### getTransaction

          public java.lang.Object getTransaction()

      Returns current open transaction.
      Returns:
        `Object` current transaction.

    - #### setTransaction

          public void setTransaction(java.lang.Object tx)

      Sets new transaction.
      Parameters:
        `tx` - `Object` new transaction.

    - #### getOpCount

          public int getOpCount()

      Returns count of operations executed.
      Returns:
        `int` executed operations count.

    - #### increaseOpCount

          public void increaseOpCount()

      Increases operations count by 1.