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 -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected org.hibernate.SessionFactorybuildSessionFactory(org.springframework.orm.hibernate5.LocalSessionFactoryBuilder localSessionFactoryBuilder) protected ClassLoaderprotected String[]protected voidreadResource(org.hibernate.cfg.Configuration configuration, String resource) protected voidreadResource(org.hibernate.cfg.Configuration configuration, URL url) voidsetConfigurationResources(String[] configurationResources) voidsetDataSource(DataSource dataSource) voidsetMvccEnabled(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, setResourceLoaderMethods inherited from class org.springframework.orm.hibernate5.HibernateExceptionTranslator
convertHibernateAccessException, setJdbcExceptionTranslator, translateExceptionIfPossible
-
Constructor Details
-
PortalHibernateConfiguration
public PortalHibernateConfiguration()
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classorg.springframework.orm.hibernate5.LocalSessionFactoryBean- Throws:
IOException
-
setConfigurationResources
-
setDataSource
- Overrides:
setDataSourcein classorg.springframework.orm.hibernate5.LocalSessionFactoryBean
-
setMvccEnabled
public void setMvccEnabled(boolean mvccEnabled) -
getPreloadClassLoaderClasses
-
buildSessionFactory
protected org.hibernate.SessionFactory buildSessionFactory(org.springframework.orm.hibernate5.LocalSessionFactoryBuilder localSessionFactoryBuilder) throws org.hibernate.HibernateException - Overrides:
buildSessionFactoryin classorg.springframework.orm.hibernate5.LocalSessionFactoryBean- Throws:
org.hibernate.HibernateException
-
getConfigurationClassLoader
-
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
-