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 void
addConfigOptions
(Map options) final void
protected void
applySettings
(Map<Object, Object> settings) protected PersistenceUnitDescriptor
protected void
Tests should ideally override this standard implementation; it may not work in all cases (e.g.protected EntityManagerFactory
protected void
protected EntityManagerFactoryScope
protected boolean
protected <T> T
fromEntityManager
(Function<EntityManager, T> action) protected <T> T
fromTransaction
(Function<EntityManager, T> action) protected Class<?>[]
String[]
Obtain theEntityManagerFactoryProducer
.protected String[]
protected void
inEntityManager
(Consumer<EntityManager> action) void
Callback to inject the EntityManagerFactoryScope into the container.protected void
inTransaction
(Consumer<EntityManager> action) protected boolean
protected boolean
-
Field Details
-
NO_MAPPINGS
-
NO_CLASSES
-
-
Constructor Details
-
EntityManagerFactoryBasedFunctionalTest
public EntityManagerFactoryBasedFunctionalTest()
-
-
Method Details
-
produceEntityManagerFactory
- Specified by:
produceEntityManagerFactory
in interfaceEntityManagerFactoryProducer
-
injectEntityManagerFactoryScope
Description copied from interface:EntityManagerFactoryScopeContainer
Callback to inject the EntityManagerFactoryScope into the container.- Specified by:
injectEntityManagerFactoryScope
in interfaceEntityManagerFactoryScopeContainer
-
getEntityManagerFactoryProducer
Description copied from interface:EntityManagerFactoryScopeContainer
Obtain theEntityManagerFactoryProducer
. Quite often this is also implemented by the container itself.- Specified by:
getEntityManagerFactoryProducer
in interfaceEntityManagerFactoryScopeContainer
-
entityManagerFactoryScope
-
entityManagerFactory
-
entityManagerFactoryBuilt
-
strictJpaCompliance
protected boolean strictJpaCompliance() -
exportSchema
protected boolean exportSchema() -
getMappings
-
addConfigOptions
-
getAnnotatedClasses
-
buildSettings
-
getConfig
-
applySettings
-
getCachedClasses
-
getCachedCollections
-
getEjb3DD
-
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
-