public abstract class BaseSessionFactoryFunctionalTest extends Object implements ServiceRegistryProducer, ServiceRegistryScopeAware, DomainModelProducer, DomainModelScopeAware, SessionFactoryProducer, SessionFactoryScopeAware
| Modifier and Type | Field and Description |
|---|---|
protected static org.hibernate.dialect.Dialect |
DIALECT |
protected static Class[] |
NO_CLASSES |
protected static String[] |
NO_MAPPINGS |
| Constructor and Description |
|---|
BaseSessionFactoryFunctionalTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterTest() |
protected void |
applyCacheSettings(org.hibernate.boot.Metadata metadata) |
protected void |
applyMetadataBuilder(org.hibernate.boot.MetadataBuilder metadataBuilder) |
protected void |
applyMetadataSources(org.hibernate.boot.MetadataSources metadataSources) |
protected void |
applySettings(org.hibernate.boot.registry.StandardServiceRegistryBuilder builder) |
protected void |
cleanupTestData() |
protected void |
configure(org.hibernate.boot.SessionFactoryBuilder builder) |
static void |
doInHibernateSessionBuilder(Supplier<org.hibernate.SessionBuilder> sessionBuilderSupplier,
TransactionUtil.HibernateTransactionConsumer function)
Execute function in a Hibernate transaction without return value
|
protected Future<?> |
executeAsync(Runnable callable) |
protected void |
executeSync(Runnable callable) |
protected boolean |
exportSchema() |
protected <T> T |
fromSession(Function<org.hibernate.engine.spi.SessionImplementor,T> action) |
protected <T> T |
fromTransaction(Function<org.hibernate.engine.spi.SessionImplementor,T> action) |
protected Class[] |
getAnnotatedClasses() |
protected String |
getCacheConcurrencyStrategy() |
protected org.hibernate.dialect.Dialect |
getDialect() |
protected org.hibernate.boot.spi.MetadataImplementor |
getMetadata() |
protected String[] |
getOrmXmlFiles() |
void |
injectServiceRegistryScope(ServiceRegistryScope registryScope) |
void |
injectSessionFactoryScope(SessionFactoryScope scope)
Callback to inject the SessionFactoryScope into the container
|
void |
injectTestModelScope(DomainModelScope modelScope) |
protected void |
inSession(Consumer<org.hibernate.engine.spi.SessionImplementor> action) |
protected void |
inTransaction(Consumer<org.hibernate.engine.spi.SessionImplementor> action) |
protected boolean |
isCleanupTestDataRequired() |
protected boolean |
overrideCacheStrategy() |
void |
prepareBootstrapRegistryBuilder(org.hibernate.boot.registry.BootstrapServiceRegistryBuilder bsrb) |
org.hibernate.boot.spi.MetadataImplementor |
produceModel(org.hibernate.boot.registry.StandardServiceRegistry serviceRegistry) |
org.hibernate.boot.registry.StandardServiceRegistry |
produceServiceRegistry(org.hibernate.boot.registry.StandardServiceRegistryBuilder ssrBuilder) |
org.hibernate.engine.spi.SessionFactoryImplementor |
produceSessionFactory(org.hibernate.boot.spi.MetadataImplementor model) |
protected org.hibernate.engine.spi.SessionFactoryImplementor |
sessionFactory() |
protected void |
sessionFactoryBuilt(org.hibernate.engine.spi.SessionFactoryImplementor factory) |
protected SessionFactoryScope |
sessionFactoryScope() |
protected static final org.hibernate.dialect.Dialect DIALECT
protected static final Class[] NO_CLASSES
protected static final String[] NO_MAPPINGS
protected SessionFactoryScope sessionFactoryScope()
protected org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory()
protected org.hibernate.boot.spi.MetadataImplementor getMetadata()
public org.hibernate.boot.registry.StandardServiceRegistry produceServiceRegistry(org.hibernate.boot.registry.StandardServiceRegistryBuilder ssrBuilder)
produceServiceRegistry in interface ServiceRegistryProducerpublic void prepareBootstrapRegistryBuilder(org.hibernate.boot.registry.BootstrapServiceRegistryBuilder bsrb)
prepareBootstrapRegistryBuilder in interface ServiceRegistryProducerprotected boolean exportSchema()
protected void applySettings(org.hibernate.boot.registry.StandardServiceRegistryBuilder builder)
public void injectServiceRegistryScope(ServiceRegistryScope registryScope)
injectServiceRegistryScope in interface ServiceRegistryScopeAwarepublic org.hibernate.boot.spi.MetadataImplementor produceModel(org.hibernate.boot.registry.StandardServiceRegistry serviceRegistry)
produceModel in interface DomainModelProducerprotected final void applyCacheSettings(org.hibernate.boot.Metadata metadata)
protected boolean overrideCacheStrategy()
protected String getCacheConcurrencyStrategy()
protected void applyMetadataBuilder(org.hibernate.boot.MetadataBuilder metadataBuilder)
protected void applyMetadataSources(org.hibernate.boot.MetadataSources metadataSources)
protected Class[] getAnnotatedClasses()
protected String[] getOrmXmlFiles()
public void injectTestModelScope(DomainModelScope modelScope)
injectTestModelScope in interface DomainModelScopeAwarepublic org.hibernate.engine.spi.SessionFactoryImplementor produceSessionFactory(org.hibernate.boot.spi.MetadataImplementor model)
produceSessionFactory in interface SessionFactoryProducerprotected void configure(org.hibernate.boot.SessionFactoryBuilder builder)
protected void sessionFactoryBuilt(org.hibernate.engine.spi.SessionFactoryImplementor factory)
public void injectSessionFactoryScope(SessionFactoryScope scope)
SessionFactoryScopeAwareinjectSessionFactoryScope in interface SessionFactoryScopeAware@AfterEach public final void afterTest()
protected boolean isCleanupTestDataRequired()
protected void cleanupTestData()
protected void inTransaction(Consumer<org.hibernate.engine.spi.SessionImplementor> action)
protected <T> T fromTransaction(Function<org.hibernate.engine.spi.SessionImplementor,T> action)
protected void inSession(Consumer<org.hibernate.engine.spi.SessionImplementor> action)
protected <T> T fromSession(Function<org.hibernate.engine.spi.SessionImplementor,T> action)
protected org.hibernate.dialect.Dialect getDialect()
protected void executeSync(Runnable callable)
public static void doInHibernateSessionBuilder(Supplier<org.hibernate.SessionBuilder> sessionBuilderSupplier, TransactionUtil.HibernateTransactionConsumer function)
sessionBuilderSupplier - SessionFactory supplierfunction - functionCopyright © 2001-2024 Red Hat, Inc. All Rights Reserved.