Class EntityManagerSourceImpl
-
- org.apache.tapestry5.internal.jpa.EntityManagerSourceImpl
-
- All Implemented Interfaces:
EntityManagerSource
public class EntityManagerSourceImpl extends implements EntityManagerSource
-
-
Constructor Summary
Constructors Constructor Description EntityManagerSourceImpl(org.slf4j.Logger logger, Resource persistenceDescriptor, PersistenceUnitConfigurer packageNamePersistenceUnitConfigurer, <,PersistenceUnitConfigurer> configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description persistenceUnitName)
Creates an EntityManager for the given persistence unit name.persistenceUnitName)
Gets the EntityManagerFactory for the given persistence unit name, creating it as necessary.<>
getPersistenceUnitInfos()
Get the list of parsed frompersistence.xml
.void
listenForShutdown(RegistryShutdownHub hub)
-
-
-
Constructor Detail
-
EntityManagerSourceImpl
public EntityManagerSourceImpl(org.slf4j.Logger logger, @Symbol("tapestry.jpa.persistence-descriptor") Resource persistenceDescriptor, @Local PersistenceUnitConfigurer packageNamePersistenceUnitConfigurer, <,PersistenceUnitConfigurer> configuration)
-
-
Method Detail
-
listenForShutdown
@PostInjection public void listenForShutdown(RegistryShutdownHub hub)
-
getEntityManagerFactory
public persistenceUnitName)
Gets the EntityManagerFactory for the given persistence unit name, creating it as necessary.- Specified by:
getEntityManagerFactory
in interfaceEntityManagerSource
- Parameters:
persistenceUnitName
- the name of a persistence unit as defined inpersistence.xml
- Returns:
- EntityManagerFactory for the given persistence unit name
-
create
public persistenceUnitName)
Description copied from interface:EntityManagerSource
Creates an EntityManager for the given persistence unit name.- Specified by:
create
in interfaceEntityManagerSource
- Parameters:
persistenceUnitName
- the name of a persistence unit as defined inpersistence.xml
- Returns:
- EntityManager for the given persistence unit name
-
getPersistenceUnitInfos
public <> getPersistenceUnitInfos()
Description copied from interface:EntityManagerSource
Get the list of parsed frompersistence.xml
.- Specified by:
getPersistenceUnitInfos
in interfaceEntityManagerSource
- Returns:
- list of PersistenceUnitInfos
-
-