Package org.springframework.orm.jpa
Interface EntityManagerFactoryInfo
- All Known Implementing Classes:
- AbstractEntityManagerFactoryBean,- LocalContainerEntityManagerFactoryBean,- LocalEntityManagerFactoryBean
public interface EntityManagerFactoryInfo
Metadata interface for a Spring-managed JPA 
EntityManagerFactory.
 This facility can be obtained from Spring-managed EntityManagerFactory proxies through casting the EntityManagerFactory handle to this interface.
- Since:
- 2.0
- Author:
- Rod Johnson, Juergen Hoeller
- 
Method SummaryModifier and TypeMethodDescriptioncreateNativeEntityManager(Map<?, ?> properties) Create a native JPA EntityManager to be used as the framework-managed resource behind an application-level EntityManager handle.Return the ClassLoader that the application's beans are loaded with.Return the JDBC DataSource that this EntityManagerFactory obtains its JDBC Connections from.Class<? extends EntityManager>Return the (potentially vendor-specific) EntityManager interface that this factory's EntityManagers will implement.Return the vendor-specific JpaDialect implementation for this EntityManagerFactory, ornullif not known.Return the raw underlying EntityManagerFactory.Return the underlying PersistenceProvider that the underlying EntityManagerFactory was created with.Return the PersistenceUnitInfo used to create this EntityManagerFactory, if the in-container API was used.Return the name of the persistence unit used to create this EntityManagerFactory, ornullif it is an unnamed default.
- 
Method Details- 
getPersistenceProviderReturn the underlying PersistenceProvider that the underlying EntityManagerFactory was created with.- Returns:
- the PersistenceProvider used to create this EntityManagerFactory,
 or nullif the standard JPA provider autodetection process was used to configure the EntityManagerFactory
 
- 
getPersistenceUnitInfoReturn the PersistenceUnitInfo used to create this EntityManagerFactory, if the in-container API was used.- Returns:
- the PersistenceUnitInfo used to create this EntityManagerFactory,
 or nullif the in-container contract was not used to configure the EntityManagerFactory
 
- 
getPersistenceUnitNameReturn the name of the persistence unit used to create this EntityManagerFactory, ornullif it is an unnamed default.If getPersistenceUnitInfo()returns non-null, the result ofgetPersistenceUnitName()must be equal to the value returned byPersistenceUnitInfo.getPersistenceUnitName().
- 
getDataSourceReturn the JDBC DataSource that this EntityManagerFactory obtains its JDBC Connections from.- Returns:
- the JDBC DataSource, or nullif not known
 
- 
getEntityManagerInterfaceReturn the (potentially vendor-specific) EntityManager interface that this factory's EntityManagers will implement.A nullreturn value suggests that autodetection is supposed to happen: either based on a targetEntityManagerinstance or simply defaulting tojakarta.persistence.EntityManager.
- 
getJpaDialectReturn the vendor-specific JpaDialect implementation for this EntityManagerFactory, ornullif not known.
- 
getBeanClassLoaderClassLoader getBeanClassLoader()Return the ClassLoader that the application's beans are loaded with.Proxies will be generated in this ClassLoader. 
- 
getNativeEntityManagerFactoryEntityManagerFactory getNativeEntityManagerFactory()Return the raw underlying EntityManagerFactory.- Returns:
- the unadorned EntityManagerFactory (never null)
 
- 
createNativeEntityManagerCreate a native JPA EntityManager to be used as the framework-managed resource behind an application-level EntityManager handle.This exposes a native EntityManagerfrom the underlyingnative EntityManagerFactory, takingJpaVendorAdapter.postProcessEntityManager(EntityManager)into account.- Since:
- 5.3
- See Also:
 
 
-