org.unitils.orm.jpa.util
Class JpaEntityManagerFactoryLoader

java.lang.Object
  extended by org.unitils.orm.jpa.util.JpaEntityManagerFactoryLoader
All Implemented Interfaces:
OrmPersistenceUnitLoader<javax.persistence.EntityManagerFactory,Object,JpaConfig>

public class JpaEntityManagerFactoryLoader
extends Object
implements OrmPersistenceUnitLoader<javax.persistence.EntityManagerFactory,Object,JpaConfig>

Loads an EntityManagerFactory given a JpaConfig object

Author:
Filip Neven, Tim Ducheyne

Constructor Summary
JpaEntityManagerFactoryLoader()
           
 
Method Summary
protected  org.springframework.orm.jpa.AbstractEntityManagerFactoryBean createEntityManagerFactoryBean(Object testObject, JpaConfig jpaConfig)
           
 ConfiguredOrmPersistenceUnit<javax.persistence.EntityManagerFactory,Object> getConfiguredOrmPersistenceUnit(Object testObject, JpaConfig entityManagerConfig)
           
protected  DatabaseModule getDatabaseModule()
           
protected  DataSource getDataSource()
           
protected  JpaModule getJpaModule()
           
protected  JpaProviderSupport getJpaProviderSupport()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JpaEntityManagerFactoryLoader

public JpaEntityManagerFactoryLoader()
Method Detail

getConfiguredOrmPersistenceUnit

public ConfiguredOrmPersistenceUnit<javax.persistence.EntityManagerFactory,Object> getConfiguredOrmPersistenceUnit(Object testObject,
                                                                                                                   JpaConfig entityManagerConfig)
Specified by:
getConfiguredOrmPersistenceUnit in interface OrmPersistenceUnitLoader<javax.persistence.EntityManagerFactory,Object,JpaConfig>
Parameters:
testObject - The test object, not null
entityManagerConfig - The persistence unit configuration, not null
Returns:
An instance of ConfiguredOrmPersistenceUnit that wraps the persistence unit and an implementation specific configuration object

createEntityManagerFactoryBean

protected org.springframework.orm.jpa.AbstractEntityManagerFactoryBean createEntityManagerFactoryBean(Object testObject,
                                                                                                      JpaConfig jpaConfig)
Parameters:
testObject - The test instance, not null
jpaConfig - The configuration parameters for the EntityManagerFactory
Returns:
A completely configured AbstractEntityManagerFactoryBean

getDataSource

protected DataSource getDataSource()

getJpaProviderSupport

protected JpaProviderSupport getJpaProviderSupport()

getDatabaseModule

protected DatabaseModule getDatabaseModule()

getJpaModule

protected JpaModule getJpaModule()


Copyright © 2011. All Rights Reserved.