Package net.officefloor.jpa
Interface JpaManagedObjectSource.PersistenceFactory
- All Known Implementing Classes:
DataNucleusJpaManagedObjectSource,HibernateJpaManagedObjectSource
- Enclosing class:
- JpaManagedObjectSource
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
FunctionalInterface to create the EntityManagerFactory.
Note: the EntityManagerFactory is required to be configured with the
input DataSource.
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.persistence.EntityManagerFactorycreateEntityManagerFactory(String persistenceUnitName, DataSource dataSource, Properties properties) Creates theEntityManagerFactory.
-
Method Details
-
createEntityManagerFactory
jakarta.persistence.EntityManagerFactory createEntityManagerFactory(String persistenceUnitName, DataSource dataSource, Properties properties) throws Exception Creates theEntityManagerFactory.- Parameters:
persistenceUnitName- Persistence Unit name.dataSource-DataSourceto use for theEntityManagerFactory.nullifEntityManagerFactoryto create and manage theDataSource.properties- Existing properties configured to theJpaManagedObjectSource.- Returns:
- Configuration for the
EntityManagerFactoryto use theDataSource. - Throws:
Exception- If fails to create theEntityManagerFactory.
-