public class HibernateSessionFactoryBean
extends org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean
Modifier and Type | Field and Description |
---|---|
protected ChainingInterceptor |
chainingInterceptor |
java.util.Map<java.lang.String,org.hibernate.Interceptor> |
interceptors |
protected java.util.Set<java.lang.String> |
packagesToScan |
protected java.util.Set<java.lang.String> |
tmpMappingResources |
Constructor and Description |
---|
HibernateSessionFactoryBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Overridden to populate mappings from modules.
|
void |
destroy() |
java.util.Set<java.lang.String> |
getModuleMappingResources() |
java.util.Set<java.lang.String> |
getModulePackagesWithMappedClasses()
Gets packages with mapped classes from all modules.
|
org.hibernate.cfg.Configuration |
newConfiguration() |
void |
setMappingJarLocations(org.springframework.core.io.Resource[] mappingJarLocations)
Used by the module testing framework to set the dependent modules in the hibernate session
factory
|
void |
setMappingResources(java.lang.String[] mappingResources)
Collect the mapping resources for future use because the mappingResources object is defined
as 'private' instead of 'protected'
|
void |
setPackagesToScan(java.lang.String[] packagesToScan)
Collect packages to scan that are set in core and for tests in modules.
|
postProcessAnnotationConfiguration, postProcessConfiguration, postProcessMappings, scanPackages, setAnnotatedClasses, setAnnotatedPackages, setConfigurationClass, setEntityTypeFilters, setResourceLoader
afterSessionFactoryCreation, buildSessionFactory, createDatabaseSchema, dropDatabaseSchema, executeSchemaScript, executeSchemaStatement, getConfigTimeCacheProvider, getConfigTimeDataSource, getConfigTimeLobHandler, getConfigTimeTransactionManager, getConfiguration, getHibernateProperties, newSessionFactory, setBeanClassLoader, setCacheableMappingLocations, setCacheProvider, setCacheRegionFactory, setCollectionCacheStrategies, setConfigLocation, setConfigLocations, setEntityCacheStrategies, setEntityInterceptor, setEventListeners, setFilterDefinitions, setHibernateProperties, setJtaTransactionManager, setLobHandler, setMappingDirectoryLocations, setMappingLocations, setNamingStrategy, setSchemaUpdate, setTypeDefinitions, updateDatabaseSchema, validateDatabaseSchema
beforeSessionFactoryDestruction, convertHibernateAccessException, getDataSource, getObject, getObjectType, getSessionFactory, isExposeTransactionAwareSessionFactory, isSingleton, isUseTransactionAwareDataSource, setDataSource, setExposeTransactionAwareSessionFactory, setJdbcExceptionTranslator, setUseTransactionAwareDataSource, translateExceptionIfPossible, wrapSessionFactoryIfNecessary
protected java.util.Set<java.lang.String> tmpMappingResources
protected java.util.Set<java.lang.String> packagesToScan
protected ChainingInterceptor chainingInterceptor
@Autowired(required=false) public java.util.Map<java.lang.String,org.hibernate.Interceptor> interceptors
public org.hibernate.cfg.Configuration newConfiguration() throws org.hibernate.HibernateException
newConfiguration
in class org.springframework.orm.hibernate3.LocalSessionFactoryBean
org.hibernate.HibernateException
public void setMappingResources(java.lang.String[] mappingResources)
setMappingResources
in class org.springframework.orm.hibernate3.LocalSessionFactoryBean
LocalSessionFactoryBean.setMappingResources(java.lang.String[])
public void setPackagesToScan(java.lang.String[] packagesToScan)
It adds to the set instead of overwriting it with each call.
setPackagesToScan
in class org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean
AnnotationSessionFactoryBean.setPackagesToScan(java.lang.String[])
public java.util.Set<java.lang.String> getModuleMappingResources()
public java.util.Set<java.lang.String> getModulePackagesWithMappedClasses()
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class org.springframework.orm.hibernate3.AbstractSessionFactoryBean
java.lang.Exception
AbstractSessionFactoryBean.afterPropertiesSet()
public void destroy() throws org.hibernate.HibernateException
destroy
in interface org.springframework.beans.factory.DisposableBean
destroy
in class org.springframework.orm.hibernate3.LocalSessionFactoryBean
org.hibernate.HibernateException
LocalSessionFactoryBean.destroy()
public void setMappingJarLocations(org.springframework.core.io.Resource[] mappingJarLocations)
setMappingJarLocations
in class org.springframework.orm.hibernate3.LocalSessionFactoryBean
LocalSessionFactoryBean.setMappingJarLocations(org.springframework.core.io.Resource[])
Copyright © 2020 OpenMRS Inc.. All Rights Reserved.