Package org.apache.tapestry5.jpa

## Interface EntityManagerSource

- All Known Implementing Classes:
    `EntityManagerSourceImpl`

      public interface EntityManagerSource

  Responsible for creating an EntityManager as needed.
  Since:
    5.3

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `EntityManager` | `create​(String persistenceUnitName)` | Creates an EntityManager for the given persistence unit name.
    `EntityManagerFactory` | `getEntityManagerFactory​(String persistenceUnitName)` | Gets the EntityManagerFactory for the given persistence unit name, creating it as necessary.
    `List<PersistenceUnitInfo>` | `getPersistenceUnitInfos()` | Get the list of PersistenceUnitInfo parsed from `persistence.xml`.

- - ### Method Detail

    - #### create

          EntityManager create​(String persistenceUnitName)

      Creates an EntityManager for the given persistence unit name.
      Parameters:
        `persistenceUnitName` - the name of a persistence unit as defined in `persistence.xml`
      Returns:
        EntityManager for the given persistence unit name

    - #### getEntityManagerFactory

          EntityManagerFactory getEntityManagerFactory​(String persistenceUnitName)

      Gets the EntityManagerFactory for the given persistence unit name, creating it as necessary.
      Parameters:
        `persistenceUnitName` - the name of a persistence unit as defined in `persistence.xml`
      Returns:
        EntityManagerFactory for the given persistence unit name

    - #### getPersistenceUnitInfos

          List<PersistenceUnitInfo> getPersistenceUnitInfos()

      Get the list of PersistenceUnitInfo parsed from `persistence.xml`.
      Returns:
        list of PersistenceUnitInfos