Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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
`javax.persistence.EntityManager` | `create(java.lang.String persistenceUnitName)` Creates an `EntityManager` for the given persistence unit name.
`javax.persistence.EntityManagerFactory` | `getEntityManagerFactory(java.lang.String persistenceUnitName)` Gets the `EntityManagerFactory` for the given persistence unit name, creating it as necessary.
`java.util.List<javax.persistence.spi.PersistenceUnitInfo>` | `getPersistenceUnitInfos()` Get the list of PersistenceUnitInfo parsed from `persistence.xml`.``

Method Detail

### create

    javax.persistence.EntityManager create(java.lang.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

    javax.persistence.EntityManagerFactory getEntityManagerFactory(java.lang.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

    java.util.List<javax.persistence.spi.PersistenceUnitInfo> getPersistenceUnitInfos()

  Get the list of PersistenceUnitInfo parsed from `persistence.xml`.

  ``
  Returns:
    list of PersistenceUnitInfos

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.