org.unitils.orm.jpa.util
Interface JpaProviderSupport

All Known Implementing Classes:
HibernateJpaProviderSupport, OpenJpaProviderSupport, ToplinkJpaProviderSupport

public interface JpaProviderSupport

Defines the contract for implementations that implement any provider specific operations that unitils needs to implement the JpaModules functionality.

Author:
Filip Neven, Tim Ducheyne

Method Summary
 void assertMappingWithDatabaseConsistent(javax.persistence.EntityManager entityManager, Object configurationObject)
          Checks if the mapping of the JPA entities with the database is still correct for the given EntityManager and provider specific configuration object
 org.springframework.instrument.classloading.LoadTimeWeaver getLoadTimeWeaver()
          If necessary for this JPA provider, return an instance of spring's LoadTimeWeaver interface, that will be set on the LocalContainerEntityManagerFactoryBean before creating the EntityManagerFactory
 Object getProviderSpecificConfigurationObject(javax.persistence.spi.PersistenceProvider persistenceProvider)
           
 org.springframework.orm.jpa.JpaVendorAdapter getSpringJpaVendorAdaptor()
           
 

Method Detail

assertMappingWithDatabaseConsistent

void assertMappingWithDatabaseConsistent(javax.persistence.EntityManager entityManager,
                                         Object configurationObject)
Checks if the mapping of the JPA entities with the database is still correct for the given EntityManager and provider specific configuration object

Parameters:
entityManager - Currently active EntityManager, not null
configurationObject - Provider specific configuration object, not null

getSpringJpaVendorAdaptor

org.springframework.orm.jpa.JpaVendorAdapter getSpringJpaVendorAdaptor()
Returns:
Implementation of spring's JpaVendorAdapter interface for this persistence provider, not null

getProviderSpecificConfigurationObject

Object getProviderSpecificConfigurationObject(javax.persistence.spi.PersistenceProvider persistenceProvider)
Parameters:
persistenceProvider - The JPA PersistenceProvider that was used for creating the EntityManagerFactory, not null
Returns:
The provider specific configuration object that was used for configuring this EntityManagerFactory, not null

getLoadTimeWeaver

org.springframework.instrument.classloading.LoadTimeWeaver getLoadTimeWeaver()
If necessary for this JPA provider, return an instance of spring's LoadTimeWeaver interface, that will be set on the LocalContainerEntityManagerFactoryBean before creating the EntityManagerFactory

Returns:
A LoadTimeWeaver, if necessary for this JPA provider, null otherwise


Copyright © 2011. All Rights Reserved.