org.codehaus.groovy.grails.orm.hibernate
Class ConfigurableLocalSessionFactoryBean
java.lang.Object
org.springframework.orm.hibernate3.AbstractSessionFactoryBean
org.springframework.orm.hibernate3.LocalSessionFactoryBean
org.codehaus.groovy.grails.orm.hibernate.ConfigurableLocalSessionFactoryBean
- All Implemented Interfaces:
- BeanClassLoaderAware, DisposableBean, FactoryBean, InitializingBean, ApplicationContextAware, PersistenceExceptionTranslator
public class ConfigurableLocalSessionFactoryBean
- extends LocalSessionFactoryBean
- implements ApplicationContextAware
A SessionFactory bean that allows the configuration class to be changed and customise for usage within Grails
- Since:
- 07-Jul-2005
- Author:
- Graeme Rocher
Methods inherited from class org.springframework.orm.hibernate3.LocalSessionFactoryBean |
afterSessionFactoryCreation, buildSessionFactory, createDatabaseSchema, destroy, dropDatabaseSchema, executeSchemaScript, executeSchemaStatement, getConfigTimeCacheProvider, getConfigTimeDataSource, getConfigTimeLobHandler, getConfigTimeTransactionManager, getConfiguration, getHibernateProperties, postProcessConfiguration, setBeanClassLoader, setCacheableMappingLocations, setCacheProvider, setCollectionCacheStrategies, setConfigLocation, setConfigLocations, setConfigurationClass, setEntityCacheStrategies, setEntityInterceptor, setEventListeners, setFilterDefinitions, setHibernateProperties, setJtaTransactionManager, setLobHandler, setMappingDirectoryLocations, setMappingJarLocations, setMappingLocations, setMappingResources, setNamingStrategy, setSchemaUpdate, setTypeDefinitions, updateDatabaseSchema |
Methods inherited from class org.springframework.orm.hibernate3.AbstractSessionFactoryBean |
afterPropertiesSet, beforeSessionFactoryDestruction, convertHibernateAccessException, getDataSource, getObject, getObjectType, getSessionFactory, isExposeTransactionAwareSessionFactory, isSingleton, isUseTransactionAwareDataSource, setDataSource, setExposeTransactionAwareSessionFactory, setJdbcExceptionTranslator, setUseTransactionAwareDataSource, translateExceptionIfPossible, wrapSessionFactoryIfNecessary |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfigurableLocalSessionFactoryBean
public ConfigurableLocalSessionFactoryBean()
setCurrentSessionContextClass
public void setCurrentSessionContextClass(Class currentSessionContextClass)
- Sets class to be used for the Hibernate CurrentSessionContext
- Parameters:
currentSessionContextClass
- An implementation of the CurrentSessionContext interface
setConfigClass
public void setConfigClass(Class configClass)
- Sets the class to be used for Hibernate Configuration
- Parameters:
configClass
- A subclass of the Hibernate Configuration class
getGrailsApplication
public GrailsApplication getGrailsApplication()
- Returns:
- Returns the grailsApplication.
setGrailsApplication
public void setGrailsApplication(GrailsApplication grailsApplication)
- Parameters:
grailsApplication
- The grailsApplication to set.
newConfiguration
protected org.hibernate.cfg.Configuration newConfiguration()
- Overrides default behaviour to allow for a configurable configuration class
- Overrides:
newConfiguration
in class LocalSessionFactoryBean
setClassLoader
public void setClassLoader(ClassLoader classLoader)
newSessionFactory
protected org.hibernate.SessionFactory newSessionFactory(org.hibernate.cfg.Configuration config)
throws org.hibernate.HibernateException
- Overrides:
newSessionFactory
in class LocalSessionFactoryBean
- Throws:
org.hibernate.HibernateException
setApplicationContext
public void setApplicationContext(ApplicationContext applicationContext)
throws BeansException
- Specified by:
setApplicationContext
in interface ApplicationContextAware
- Throws:
BeansException
Copyright (c) 2005-2006 The Grails project