org.unitils.orm.jpa.util
Class JpaEntityManagerFactoryLoader
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JpaEntityManagerFactoryLoader
public JpaEntityManagerFactoryLoader()
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 nullentityManagerConfig
- 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 nulljpaConfig
- 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.