public class EntityManagerSourceImpl extends Object implements EntityManagerSource
Constructor and Description |
---|
EntityManagerSourceImpl(org.slf4j.Logger logger,
Resource persistenceDescriptor,
PersistenceUnitConfigurer packageNamePersistenceUnitConfigurer,
Map<String,PersistenceUnitConfigurer> configuration) |
Modifier and Type | Method and 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 . |
void |
listenForShutdown(RegistryShutdownHub hub) |
public EntityManagerSourceImpl(org.slf4j.Logger logger, @Symbol(value="tapestry.jpa.persistence-descriptor") Resource persistenceDescriptor, @Local PersistenceUnitConfigurer packageNamePersistenceUnitConfigurer, Map<String,PersistenceUnitConfigurer> configuration)
@PostInjection public void listenForShutdown(RegistryShutdownHub hub)
public EntityManagerFactory getEntityManagerFactory(String persistenceUnitName)
getEntityManagerFactory
in interface EntityManagerSource
persistenceUnitName
- the name of a persistence unit as defined in persistence.xml
public EntityManager create(String persistenceUnitName)
EntityManagerSource
create
in interface EntityManagerSource
persistenceUnitName
- the name of a persistence unit as defined in persistence.xml
public List<PersistenceUnitInfo> getPersistenceUnitInfos()
EntityManagerSource
persistence.xml
.getPersistenceUnitInfos
in interface EntityManagerSource
5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.