Package org.hibernate.testing.orm.junit
Class EntityManagerFactoryBasedFunctionalTest
java.lang.Object
org.hibernate.testing.orm.junit.EntityManagerFactoryBasedFunctionalTest
- All Implemented Interfaces:
EntityManagerFactoryProducer,EntityManagerFactoryScopeContainer
public class EntityManagerFactoryBasedFunctionalTest
extends Object
implements EntityManagerFactoryProducer, EntityManagerFactoryScopeContainer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddConfigOptions(Map options) final voidprotected voidapplySettings(Map<Object, Object> settings) protected org.hibernate.jpa.boot.spi.PersistenceUnitDescriptorprotected voidTests should ideally override this standard implementation; it may not work in all cases (e.g.protected EntityManagerFactoryprotected voidprotected EntityManagerFactoryScopeprotected booleanprotected <T> TfromEntityManager(Function<EntityManager, T> action) protected <T> TfromTransaction(Function<EntityManager, T> action) protected Class<?>[]String[]Obtain theEntityManagerFactoryProducer.protected String[]protected voidinEntityManager(Consumer<EntityManager> action) voidCallback to inject the EntityManagerFactoryScope into the container.protected voidinTransaction(Consumer<EntityManager> action) protected booleanprotected boolean
-
Field Details
-
NO_MAPPINGS
-
NO_CLASSES
-
-
Constructor Details
-
EntityManagerFactoryBasedFunctionalTest
public EntityManagerFactoryBasedFunctionalTest()
-
-
Method Details
-
produceEntityManagerFactory
- Specified by:
produceEntityManagerFactoryin interfaceEntityManagerFactoryProducer
-
injectEntityManagerFactoryScope
Description copied from interface:EntityManagerFactoryScopeContainerCallback to inject the EntityManagerFactoryScope into the container.- Specified by:
injectEntityManagerFactoryScopein interfaceEntityManagerFactoryScopeContainer
-
getEntityManagerFactoryProducer
Description copied from interface:EntityManagerFactoryScopeContainerObtain theEntityManagerFactoryProducer. Quite often this is also implemented by the container itself.- Specified by:
getEntityManagerFactoryProducerin interfaceEntityManagerFactoryScopeContainer
-
entityManagerFactoryScope
-
entityManagerFactory
-
entityManagerFactoryBuilt
-
strictJpaCompliance
protected boolean strictJpaCompliance() -
exportSchema
protected boolean exportSchema() -
getMappings
-
addConfigOptions
-
getAnnotatedClasses
-
buildSettings
-
getConfig
-
applySettings
-
getCachedClasses
-
getCachedCollections
-
getEjb3DD
-
buildPersistenceUnitDescriptor
protected org.hibernate.jpa.boot.spi.PersistenceUnitDescriptor buildPersistenceUnitDescriptor() -
afterTest
@AfterEach public final void afterTest() -
isCleanupTestDataRequired
protected boolean isCleanupTestDataRequired() -
cleanupTestData
protected void cleanupTestData()Tests should ideally override this standard implementation; it may not work in all cases (e.g. with @Embeddable entities) -
inTransaction
-
fromTransaction
-
inEntityManager
-
fromEntityManager
-