Package ubic.gemma.persistence.hibernate
Class LocalSessionFactoryBean
- java.lang.Object
-
- ubic.gemma.persistence.hibernate.LocalSessionFactoryBean
-
- All Implemented Interfaces:
Aware
,DisposableBean
,FactoryBean<SessionFactory>
,InitializingBean
,ResourceLoaderAware
public class LocalSessionFactoryBean extends Object implements FactoryBean<SessionFactory>, ResourceLoaderAware, InitializingBean, DisposableBean
Reimplementation ofLocalSessionFactoryBean
that supports resolving XSD schemas in the classpath.It's been slimmed down to what we actually use in Gemma.
- See Also:
XSDEntityResolver
,LocalSessionFactoryBean
-
-
Constructor Summary
Constructors Constructor Description LocalSessionFactoryBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
protected SessionFactory
buildSessionFactory(LocalSessionFactoryBuilder sfb)
void
destroy()
Configuration
getConfiguration()
Properties
getHibernateProperties()
Return the Hibernate properties, if any.SessionFactory
getObject()
Class<?>
getObjectType()
boolean
isSingleton()
void
setAnnotatedClasses(Class<?>... annotatedClasses)
void
setConfigLocation(Resource configLocation)
void
setDataSource(DataSource dataSource)
void
setHibernateProperties(Properties hibernateProperties)
void
setResourceLoader(ResourceLoader resourceLoader)
-
-
-
Method Detail
-
setDataSource
public void setDataSource(DataSource dataSource)
-
setConfigLocation
public void setConfigLocation(Resource configLocation)
-
setHibernateProperties
public void setHibernateProperties(Properties hibernateProperties)
-
getHibernateProperties
public Properties getHibernateProperties()
Return the Hibernate properties, if any. Mainly available for configuration through property paths that specify individual keys.
-
setAnnotatedClasses
public void setAnnotatedClasses(Class<?>... annotatedClasses)
-
setResourceLoader
public void setResourceLoader(ResourceLoader resourceLoader)
- Specified by:
setResourceLoader
in interfaceResourceLoaderAware
-
afterPropertiesSet
public void afterPropertiesSet() throws IOException
- Specified by:
afterPropertiesSet
in interfaceInitializingBean
- Throws:
IOException
-
buildSessionFactory
protected SessionFactory buildSessionFactory(LocalSessionFactoryBuilder sfb)
-
getConfiguration
public final Configuration getConfiguration()
-
getObject
public SessionFactory getObject()
- Specified by:
getObject
in interfaceFactoryBean<SessionFactory>
-
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectType
in interfaceFactoryBean<SessionFactory>
-
isSingleton
public boolean isSingleton()
- Specified by:
isSingleton
in interfaceFactoryBean<SessionFactory>
-
destroy
public void destroy()
- Specified by:
destroy
in interfaceDisposableBean
-
-