Package ubic.gemma.persistence.hibernate
Class LocalSessionFactoryBean
java.lang.Object
ubic.gemma.persistence.hibernate.LocalSessionFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.FactoryBean<SessionFactory>
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ResourceLoaderAware
public class LocalSessionFactoryBean
extends Object
implements org.springframework.beans.factory.FactoryBean<SessionFactory>, org.springframework.context.ResourceLoaderAware, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Reimplementation of
LocalSessionFactoryBean
that supports resolving XSD
schemas in the classpath.
It's been slimmed down to what we actually use in Gemma.
- Author:
- poirigui
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected SessionFactory
void
destroy()
final Configuration
Return the Hibernate properties, if any.Class
<?> boolean
void
setAnnotatedClasses
(Class<?>... annotatedClasses) void
setConfigLocation
(org.springframework.core.io.Resource configLocation) void
setDataSource
(DataSource dataSource) void
setHibernateProperties
(Properties hibernateProperties) void
setResourceLoader
(org.springframework.core.io.ResourceLoader resourceLoader)
-
Constructor Details
-
LocalSessionFactoryBean
public LocalSessionFactoryBean()
-
-
Method Details
-
setDataSource
-
setConfigLocation
public void setConfigLocation(org.springframework.core.io.Resource configLocation) -
setHibernateProperties
-
getHibernateProperties
Return the Hibernate properties, if any. Mainly available for configuration through property paths that specify individual keys. -
setAnnotatedClasses
-
setResourceLoader
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) - Specified by:
setResourceLoader
in interfaceorg.springframework.context.ResourceLoaderAware
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
IOException
-
buildSessionFactory
-
getConfiguration
-
getObject
- Specified by:
getObject
in interfaceorg.springframework.beans.factory.FactoryBean<SessionFactory>
-
getObjectType
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<SessionFactory>
-
isSingleton
public boolean isSingleton()- Specified by:
isSingleton
in interfaceorg.springframework.beans.factory.FactoryBean<SessionFactory>
-
destroy
public void destroy()- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
-