public interface JpaVendorAdapter
AbstractEntityManagerFactoryBean.setJpaVendorAdapter(org.springframework.orm.jpa.JpaVendorAdapter)
Modifier and Type | Method and Description |
---|---|
java.lang.Class<? extends EntityManagerFactory> |
getEntityManagerFactoryInterface()
Return the vendor-specific EntityManagerFactory interface
that the EntityManagerFactory proxy is supposed to implement.
|
java.lang.Class<? extends EntityManager> |
getEntityManagerInterface()
Return the vendor-specific EntityManager interface
that this provider's EntityManagers will implement.
|
JpaDialect |
getJpaDialect()
Return the vendor-specific JpaDialect implementation for this
provider, or
null if there is none. |
java.util.Map<java.lang.String,?> |
getJpaPropertyMap()
Return a Map of vendor-specific JPA properties,
typically based on settings in this JpaVendorAdapter instance.
|
java.util.Map<java.lang.String,?> |
getJpaPropertyMap(PersistenceUnitInfo pui)
Return a Map of vendor-specific JPA properties for the given persistence
unit, typically based on settings in this JpaVendorAdapter instance.
|
PersistenceProvider |
getPersistenceProvider()
Return the vendor-specific persistence provider.
|
java.lang.String |
getPersistenceProviderRootPackage()
Return the name of the persistence provider's root package
(e.g.
|
void |
postProcessEntityManagerFactory(EntityManagerFactory emf)
Optional callback for post-processing the native EntityManagerFactory
before active use.
|
PersistenceProvider getPersistenceProvider()
java.lang.String getPersistenceProviderRootPackage()
java.util.Map<java.lang.String,?> getJpaPropertyMap(PersistenceUnitInfo pui)
Note that there might be further JPA properties defined on the EntityManagerFactory bean, which might potentially override individual JPA property values specified here.
This implementation delegates to getJpaPropertyMap()
for
non-unit-dependent properties. Effectively, this PersistenceUnitInfo-based
variant only needs to be implemented if there is an actual need to react
to unit-specific characteristics such as the transaction type.
NOTE: This variant will only be invoked in case of Java EE style
container bootstrapping where a PersistenceUnitInfo
is present
(i.e. LocalContainerEntityManagerFactoryBean
. In case of simple
Java SE style bootstrapping via Persistence
(i.e. LocalEntityManagerFactoryBean
), the parameter-less
getJpaPropertyMap()
variant will be called directly.
pui
- the PersistenceUnitInfo for the current persistence unitPersistenceUnitInfo.getTransactionType()
,
PersistenceProvider.createContainerEntityManagerFactory(PersistenceUnitInfo, Map)
java.util.Map<java.lang.String,?> getJpaPropertyMap()
Note that there might be further JPA properties defined on the EntityManagerFactory bean, which might potentially override individual JPA property values specified here.
Persistence.createEntityManagerFactory(String, Map)
JpaDialect getJpaDialect()
null
if there is none.java.lang.Class<? extends EntityManagerFactory> getEntityManagerFactoryInterface()
If the provider does not offer any EntityManagerFactory extensions,
the adapter should simply return the standard
EntityManagerFactory
class here.
java.lang.Class<? extends EntityManager> getEntityManagerInterface()
If the provider does not offer any EntityManager extensions,
the adapter should simply return the standard
EntityManager
class here.
void postProcessEntityManagerFactory(EntityManagerFactory emf)
This can be used for triggering vendor-specific initialization processes. While this is not expected to be used for most providers, it is included here as a general extension hook.