Class PortalHibernateConfiguration

Object
org.springframework.orm.hibernate5.HibernateExceptionTranslator
org.springframework.orm.hibernate5.LocalSessionFactoryBean
com.liferay.portal.spring.hibernate.PortalHibernateConfiguration
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:
PortletHibernateConfiguration

public class PortalHibernateConfiguration extends org.springframework.orm.hibernate5.LocalSessionFactoryBean
Author:
Brian Wing Shun Chan, Marcellus Tavares, Shuyang Zhou, Tomas Polesovsky
  • Field Summary

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

    OBJECT_TYPE_ATTRIBUTE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected org.hibernate.SessionFactory
    buildSessionFactory(org.springframework.orm.hibernate5.LocalSessionFactoryBuilder localSessionFactoryBuilder)
     
    protected ClassLoader
     
    protected String[]
     
    protected static Map<String,Class<?>>
     
    protected void
    readResource(org.hibernate.cfg.Configuration configuration, String resource)
     
    protected void
    readResource(org.hibernate.cfg.Configuration configuration, URL url)
     
    void
    setConfigurationResources(String[] configurationResources)
     
    void
     
    void
    setMvccEnabled(boolean mvccEnabled)
     

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PortalHibernateConfiguration

      public PortalHibernateConfiguration()
  • Method Details

    • 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
    • setConfigurationResources

      public void setConfigurationResources(String[] configurationResources)
    • setDataSource

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

      public void setMvccEnabled(boolean mvccEnabled)
    • getPreloadClassLoaderClasses

      protected static Map<String,Class<?>> getPreloadClassLoaderClasses()
    • buildSessionFactory

      protected org.hibernate.SessionFactory buildSessionFactory(org.springframework.orm.hibernate5.LocalSessionFactoryBuilder localSessionFactoryBuilder) throws org.hibernate.HibernateException
      Overrides:
      buildSessionFactory in class org.springframework.orm.hibernate5.LocalSessionFactoryBean
      Throws:
      org.hibernate.HibernateException
    • getConfigurationClassLoader

      protected ClassLoader getConfigurationClassLoader()
    • getConfigurationResources

      protected String[] getConfigurationResources()
    • readResource

      protected void readResource(org.hibernate.cfg.Configuration configuration, String resource) throws Exception
      Throws:
      Exception
    • readResource

      protected void readResource(org.hibernate.cfg.Configuration configuration, URL url) throws Exception
      Throws:
      Exception