站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.1.0 API 文档英文版

JpaVendorAdapter (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版


The Spring Framework

org.springframework.orm.jpa
Interface JpaVendorAdapter

All Known Implementing Classes:
AbstractJpaVendorAdapter, HibernateJpaVendorAdapter, OpenJpaVendorAdapter, TopLinkJpaVendorAdapter

public interface JpaVendorAdapter

SPI interface that allows to plug in vendor-specific behavior into Spring's EntityManagerFactory creators. Serves as single configuration point for all vendor-specific properties.

Since:
2.0
Author:
Juergen Hoeller, Rod Johnson
See Also:
AbstractEntityManagerFactoryBean.setJpaVendorAdapter(org.springframework.orm.jpa.JpaVendorAdapter)

Method Summary
 Class<? extends javax.persistence.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.
 Map getJpaPropertyMap()
          Return a Map of vendor-specific JPA properties, typically based on settings in this JpaVendorAdapter instance.
 javax.persistence.spi.PersistenceProvider getPersistenceProvider()
          Return the vendor-specific persistence provider.
 void postProcessEntityManagerFactory(javax.persistence.EntityManagerFactory emf)
          Optional callback for post-processing the native EntityManagerFactory before active use.
 

Method Detail

getPersistenceProvider

javax.persistence.spi.PersistenceProvider getPersistenceProvider()
Return the vendor-specific persistence provider.


getJpaPropertyMap

Map getJpaPropertyMap()
Return a Map of vendor-specific JPA properties, typically based on settings in this JpaVendorAdapter instance.

Note that there might be further JPA properties defined on the EntityManagerFactory bean, which might potentially override individual JPA property values specified here.

Returns:
a Map of JPA properties, as as accepted by the standard JPA bootstrap facilities, or null or an empty Map if there are no such properties to expose
See Also:
Persistence.createEntityManagerFactory(String, java.util.Map), PersistenceProvider.createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo, java.util.Map)

getEntityManagerInterface

Class<? extends javax.persistence.EntityManager> getEntityManagerInterface()
Return the vendor-specific EntityManager interface that this provider's EntityManagers will implement.

If the provider does not offer any EntityManager extensions, the adapter should simply return the standard EntityManager class here.


getJpaDialect

JpaDialect getJpaDialect()
Return the vendor-specific JpaDialect implementation for this provider, or null if there is none.


postProcessEntityManagerFactory

void postProcessEntityManagerFactory(javax.persistence.EntityManagerFactory emf)
Optional callback for post-processing the native EntityManagerFactory before active use.

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.


The Spring Framework

Copyright © 2002-2007 The Spring Framework.