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
Modifier and TypeMethodDescriptionjavax.persistence.EntityManager
Creates an EntityManager for the given persistence unit name.javax.persistence.EntityManagerFactory
getEntityManagerFactory
(String persistenceUnitName) Gets the EntityManagerFactory for the given persistence unit name, creating it as necessary.List<javax.persistence.spi.PersistenceUnitInfo>
Get the list of PersistenceUnitInfo parsed frompersistence.xml
.
-
Method Details
-
create
Creates an EntityManager for the given persistence unit name.- Parameters:
persistenceUnitName
- the name of a persistence unit as defined inpersistence.xml
- Returns:
- EntityManager for the given persistence unit name
-
getEntityManagerFactory
Gets the EntityManagerFactory for the given persistence unit name, creating it as necessary.- Parameters:
persistenceUnitName
- the name of a persistence unit as defined inpersistence.xml
- Returns:
- EntityManagerFactory for the given persistence unit name
-
getPersistenceUnitInfos
List<javax.persistence.spi.PersistenceUnitInfo> getPersistenceUnitInfos()Get the list of PersistenceUnitInfo parsed frompersistence.xml
.- Returns:
- list of PersistenceUnitInfos
-