Class ConfigurableLocalSessionFactoryBean

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<org.hibernate.SessionFactory>, org.springframework.beans.factory.InitializingBean, org.springframework.context.ResourceLoaderAware, org.springframework.dao.support.PersistenceExceptionTranslator
    Direct Known Subclasses:
    ConfluenceLocalSessionFactoryBean, ConfluenceLocalSessionFactoryBeanForBackup

    public class ConfigurableLocalSessionFactoryBean
    extends org.springframework.orm.hibernate5.LocalSessionFactoryBean
    A subclass of Spring's LocalSessionFactoryBean which changes how Hibernate is configured.
    Since:
    6.10.0
    • Field Summary

      • Fields inherited from interface org.springframework.beans.factory.FactoryBean

        OBJECT_TYPE_ATTRIBUTE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()  
      protected org.hibernate.SessionFactory buildSessionFactory​(org.springframework.orm.hibernate5.LocalSessionFactoryBuilder config)  
      protected void prepareConfiguration​(org.hibernate.cfg.Configuration config)
      This method is called after the Configuration object has been created and before the SessionFactory has been created.
      void setCurrentMappingResources​(Iterable<String> mappingResources)  
      void setDataSource​(DataSource dataSource)  
      void setHibernateConfig​(com.atlassian.config.db.HibernateConfig hibernateConfig)  
      • Methods inherited from class org.springframework.orm.hibernate5.LocalSessionFactoryBean

        destroy, getConfiguration, getHibernateProperties, getMetadataSources, getObject, getObjectType, getResourceLoader, isSingleton, setAnnotatedClasses, setAnnotatedPackages, setBeanFactory, setBootstrapExecutor, setCacheableMappingLocations, setCacheRegionFactory, setConfigLocation, setConfigLocations, setCurrentTenantIdentifierResolver, setEntityInterceptor, setEntityTypeFilters, setHibernateIntegrators, setHibernateProperties, setImplicitNamingStrategy, setJtaTransactionManager, setMappingDirectoryLocations, setMappingJarLocations, setMappingLocations, setMappingResources, setMetadataSources, setMultiTenantConnectionProvider, setPackagesToScan, setPhysicalNamingStrategy, setResourceLoader
      • Methods inherited from class org.springframework.orm.hibernate5.HibernateExceptionTranslator

        convertHibernateAccessException, setJdbcExceptionTranslator, translateExceptionIfPossible
    • Method Detail

      • setHibernateConfig

        public void setHibernateConfig​(com.atlassian.config.db.HibernateConfig hibernateConfig)
      • setCurrentMappingResources

        public void setCurrentMappingResources​(Iterable<String> mappingResources)
      • setDataSource

        public void setDataSource​(DataSource dataSource)
        Overrides:
        setDataSource in class org.springframework.orm.hibernate5.LocalSessionFactoryBean
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws IOException
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Overrides:
        afterPropertiesSet in class org.springframework.orm.hibernate5.LocalSessionFactoryBean
        Throws:
        IOException
      • buildSessionFactory

        protected org.hibernate.SessionFactory buildSessionFactory​(org.springframework.orm.hibernate5.LocalSessionFactoryBuilder config)
        Overrides:
        buildSessionFactory in class org.springframework.orm.hibernate5.LocalSessionFactoryBean
      • prepareConfiguration

        protected void prepareConfiguration​(org.hibernate.cfg.Configuration config)
        This method is called after the Configuration object has been created and before the SessionFactory has been created.