org.codehaus.groovy.grails.orm.hibernate
Class HibernateDatastore

java.lang.Object
  extended by org.grails.datastore.mapping.core.AbstractDatastore
      extended by org.codehaus.groovy.grails.orm.hibernate.HibernateDatastore
All Implemented Interfaces:
org.grails.datastore.mapping.core.Datastore

public class HibernateDatastore
extends org.grails.datastore.mapping.core.AbstractDatastore

Datastore implementation that uses a Hibernate SessionFactory underneath.

Since:
2.0

Field Summary
 
Fields inherited from class org.grails.datastore.mapping.core.AbstractDatastore
cacheAdapterRepository, connectionDetails, mappingContext
 
Constructor Summary
HibernateDatastore(org.grails.datastore.mapping.model.MappingContext mappingContext, org.hibernate.SessionFactory sessionFactory, org.springframework.context.ApplicationContext applicationContext, groovy.util.ConfigObject config)
           
 
Method Summary
protected  org.grails.datastore.mapping.core.Session createSession(java.util.Map<java.lang.String,java.lang.String> connectionDetails)
           
 EventTriggeringInterceptor getEventTriggeringInterceptor()
           
 org.hibernate.SessionFactory getSessionFactory()
           
protected  boolean registerValidationListener()
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 
Methods inherited from class org.grails.datastore.mapping.core.AbstractDatastore
connect, connect, getApplicationContext, getApplicationEventPublisher, getCurrentSession, getMappingContext, getObjectErrors, getValidationErrorsMap, getValidationSkipMap, hasCurrentSession, initializeConverters, isIndexed, retrieveSession, retrieveSession, setApplicationContext, setConnectionDetails, setObjectErrors, setSkipValidation, skipValidation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateDatastore

public HibernateDatastore(org.grails.datastore.mapping.model.MappingContext mappingContext,
                          org.hibernate.SessionFactory sessionFactory,
                          org.springframework.context.ApplicationContext applicationContext,
                          groovy.util.ConfigObject config)
Method Detail

getSessionFactory

public org.hibernate.SessionFactory getSessionFactory()
Returns:
The Hibernate SessionFactory being used by this datastore instance

createSession

protected org.grails.datastore.mapping.core.Session createSession(java.util.Map<java.lang.String,java.lang.String> connectionDetails)
Specified by:
createSession in class org.grails.datastore.mapping.core.AbstractDatastore

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Throws:
org.springframework.beans.BeansException

registerValidationListener

protected boolean registerValidationListener()
Overrides:
registerValidationListener in class org.grails.datastore.mapping.core.AbstractDatastore

getEventTriggeringInterceptor

public EventTriggeringInterceptor getEventTriggeringInterceptor()