public class EntityManagerFactoryBuilder extends Object
LocalContainerEntityManagerFactoryBean
through a fluent builder pattern. The
most common options are covered in the builder, but you can always manipulate the
product of the builder if you need more control, before returning it from a
@Bean
definition.Modifier and Type | Class and Description |
---|---|
class |
EntityManagerFactoryBuilder.Builder
A fluent builder for a LocalContainerEntityManagerFactoryBean.
|
static interface |
EntityManagerFactoryBuilder.EntityManagerFactoryBeanCallback
Deprecated.
|
Constructor and Description |
---|
EntityManagerFactoryBuilder(org.springframework.orm.jpa.JpaVendorAdapter jpaVendorAdapter,
Map<String,?> jpaProperties,
org.springframework.orm.jpa.persistenceunit.PersistenceUnitManager persistenceUnitManager)
Create a new instance passing in the common pieces that will be shared if multiple
EntityManagerFactory instances are created.
|
EntityManagerFactoryBuilder(org.springframework.orm.jpa.JpaVendorAdapter jpaVendorAdapter,
Map<String,?> jpaProperties,
org.springframework.orm.jpa.persistenceunit.PersistenceUnitManager persistenceUnitManager,
URL persistenceUnitRootLocation)
Create a new instance passing in the common pieces that will be shared if multiple
EntityManagerFactory instances are created.
|
Modifier and Type | Method and Description |
---|---|
EntityManagerFactoryBuilder.Builder |
dataSource(DataSource dataSource) |
void |
setCallback(EntityManagerFactoryBuilder.EntityManagerFactoryBeanCallback callback)
Deprecated.
|
public EntityManagerFactoryBuilder(org.springframework.orm.jpa.JpaVendorAdapter jpaVendorAdapter, Map<String,?> jpaProperties, org.springframework.orm.jpa.persistenceunit.PersistenceUnitManager persistenceUnitManager)
jpaVendorAdapter
- a vendor adapterjpaProperties
- the JPA properties to be passed to the persistence providerpersistenceUnitManager
- optional source of persistence unit information (can
be null)public EntityManagerFactoryBuilder(org.springframework.orm.jpa.JpaVendorAdapter jpaVendorAdapter, Map<String,?> jpaProperties, org.springframework.orm.jpa.persistenceunit.PersistenceUnitManager persistenceUnitManager, URL persistenceUnitRootLocation)
jpaVendorAdapter
- a vendor adapterjpaProperties
- the JPA properties to be passed to the persistence providerpersistenceUnitManager
- optional source of persistence unit information (can
be null)persistenceUnitRootLocation
- the persistence unit root location to use as a
fallback (can be null)public EntityManagerFactoryBuilder.Builder dataSource(DataSource dataSource)
@Deprecated public void setCallback(EntityManagerFactoryBuilder.EntityManagerFactoryBeanCallback callback)
callback
- the entity manager factory bean callbackCopyright © 2019 Pivotal Software, Inc.. All rights reserved.