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 Details

    • LocalSessionFactoryBean

      public LocalSessionFactoryBean()
  • Method Details

    • setDataSource

      public void setDataSource(DataSource dataSource)
    • setConfigLocation

      public void setConfigLocation(org.springframework.core.io.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(org.springframework.core.io.ResourceLoader resourceLoader)
      Specified by:
      setResourceLoader in interface org.springframework.context.ResourceLoaderAware
    • afterPropertiesSet

      public void afterPropertiesSet() throws IOException
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      IOException
    • buildSessionFactory

      protected SessionFactory buildSessionFactory(LocalSessionFactoryBuilder sfb)
    • getConfiguration

      public final Configuration getConfiguration()
    • getObject

      public SessionFactory getObject()
      Specified by:
      getObject in interface org.springframework.beans.factory.FactoryBean<SessionFactory>
    • getObjectType

      public Class<?> getObjectType()
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean<SessionFactory>
    • isSingleton

      public boolean isSingleton()
      Specified by:
      isSingleton in interface org.springframework.beans.factory.FactoryBean<SessionFactory>
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean