public class

HibernateJpaVendorAdapter

extends AbstractJpaVendorAdapter
java.lang.Object
   ↳ org.springframework.orm.jpa.vendor.AbstractJpaVendorAdapter
     ↳ org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter

Class Overview

JpaVendorAdapter implementation for Hibernate EntityManager. Developed and tested against Hibernate 3.3.

Exposes Hibernate's persistence provider and EntityManager extension interface, and supports AbstractJpaVendorAdapter's common configuration settings.

See Also
  • org.hibernate.ejb.HibernatePersistence
  • org.hibernate.ejb.HibernateEntityManager

Summary

Public Constructors
HibernateJpaVendorAdapter()
Public Methods
Class<? extends EntityManagerFactory> getEntityManagerFactoryInterface()
Return the vendor-specific EntityManagerFactory interface that the EntityManagerFactory proxy is supposed to implement.
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.
Map<StringObject> getJpaPropertyMap()
Return a Map of vendor-specific JPA properties, typically based on settings in this JpaVendorAdapter instance.
PersistenceProvider getPersistenceProvider()
String getPersistenceProviderRootPackage()
Return the name of the persistence provider's root package (e.g.
Protected Methods
Class determineDatabaseDialectClass(Database database)
Determine the Hibernate database dialect class for the given target database.
[Expand]
Inherited Methods
From class org.springframework.orm.jpa.vendor.AbstractJpaVendorAdapter
From class java.lang.Object
From interface org.springframework.orm.jpa.JpaVendorAdapter

Public Constructors

public HibernateJpaVendorAdapter ()

Public Methods

public Class<? extends EntityManagerFactory> getEntityManagerFactoryInterface ()

Return the vendor-specific EntityManagerFactory interface that the EntityManagerFactory proxy is supposed to implement.

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

public Class<? extends 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 javax.persistence.EntityManager class here.

public JpaDialect getJpaDialect ()

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

public Map<StringObject> 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

public PersistenceProvider getPersistenceProvider ()

public String getPersistenceProviderRootPackage ()

Return the name of the persistence provider's root package (e.g. "oracle.toplink.essentials"). Will be used for excluding provider classes from temporary class overriding.

Protected Methods

protected Class determineDatabaseDialectClass (Database database)

Determine the Hibernate database dialect class for the given target database.

Parameters
database the target database
Returns
  • the Hibernate database dialect class, or null if none found