Class BaseSessionFactoryFunctionalTest

    • Field Detail

      • DIALECT

        protected static final org.hibernate.dialect.Dialect DIALECT
      • NO_CLASSES

        protected static final Class[] NO_CLASSES
      • NO_MAPPINGS

        protected static final String[] NO_MAPPINGS
    • Constructor Detail

      • BaseSessionFactoryFunctionalTest

        public BaseSessionFactoryFunctionalTest()
    • Method Detail

      • sessionFactory

        protected org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory()
      • getMetadata

        protected org.hibernate.boot.spi.MetadataImplementor getMetadata()
      • produceServiceRegistry

        public org.hibernate.boot.registry.StandardServiceRegistry produceServiceRegistry​(org.hibernate.boot.registry.StandardServiceRegistryBuilder ssrBuilder)
        Specified by:
        produceServiceRegistry in interface ServiceRegistryProducer
      • exportSchema

        protected boolean exportSchema()
      • applySettings

        protected void applySettings​(org.hibernate.boot.registry.StandardServiceRegistryBuilder builder)
      • produceModel

        public org.hibernate.boot.spi.MetadataImplementor produceModel​(org.hibernate.boot.registry.StandardServiceRegistry serviceRegistry)
        Specified by:
        produceModel in interface DomainModelProducer
      • applyCacheSettings

        protected final void applyCacheSettings​(org.hibernate.boot.Metadata metadata)
      • overrideCacheStrategy

        protected boolean overrideCacheStrategy()
      • getCacheConcurrencyStrategy

        protected String getCacheConcurrencyStrategy()
      • applyMetadataBuilder

        protected void applyMetadataBuilder​(org.hibernate.boot.MetadataBuilder metadataBuilder)
      • applyMetadataSources

        protected void applyMetadataSources​(org.hibernate.boot.MetadataSources metadataSources)
      • getAnnotatedClasses

        protected Class[] getAnnotatedClasses()
      • getOrmXmlFiles

        protected String[] getOrmXmlFiles()
      • produceSessionFactory

        public org.hibernate.engine.spi.SessionFactoryImplementor produceSessionFactory​(org.hibernate.boot.spi.MetadataImplementor model)
        Specified by:
        produceSessionFactory in interface SessionFactoryProducer
      • configure

        protected void configure​(org.hibernate.boot.SessionFactoryBuilder builder)
      • sessionFactoryBuilt

        protected void sessionFactoryBuilt​(org.hibernate.engine.spi.SessionFactoryImplementor factory)
      • afterTest

        @AfterEach
        public final void afterTest()
      • isCleanupTestDataRequired

        protected boolean isCleanupTestDataRequired()
      • cleanupTestData

        protected void cleanupTestData()
      • inTransaction

        protected void inTransaction​(Consumer<org.hibernate.engine.spi.SessionImplementor> action)
      • fromTransaction

        protected <T> T fromTransaction​(Function<org.hibernate.engine.spi.SessionImplementor,​T> action)
      • inSession

        protected void inSession​(Consumer<org.hibernate.engine.spi.SessionImplementor> action)
      • fromSession

        protected <T> T fromSession​(Function<org.hibernate.engine.spi.SessionImplementor,​T> action)
      • getDialect

        protected org.hibernate.dialect.Dialect getDialect()
      • executeAsync

        protected Future<?> executeAsync​(Runnable callable)
      • executeSync

        protected void executeSync​(Runnable callable)
      • doInHibernateSessionBuilder

        public static void doInHibernateSessionBuilder​(Supplier<org.hibernate.SessionBuilder> sessionBuilderSupplier,
                                                       TransactionUtil.HibernateTransactionConsumer function)
        Execute function in a Hibernate transaction without return value
        Parameters:
        sessionBuilderSupplier - SessionFactory supplier
        function - function