Groovy Documentation

org.codehaus.groovy.grails.plugins.orm.hibernate
[Groovy] Class HibernatePluginSupport

java.lang.Object
  org.codehaus.groovy.grails.plugins.orm.hibernate.HibernatePluginSupport

class HibernatePluginSupport
extends java.lang.Object

Used by HibernateGrailsPlugin to implement the core parts of GORM.

Authors:
Graeme Rocher
Since:
1.1


Property Summary
static java.lang.Object LAZY_PROPERTY_HANDLER

static org.apache.commons.logging.Log LOG

static int RELOAD_RETRY_LIMIT

static java.lang.Object doWithDynamicMethods

static java.lang.Object doWithSpring

static java.lang.Object onChange

 
Method Summary
static java.lang.Object convertValueToIdentifierType(java.lang.Object grailsDomainClass, java.lang.Object idValue)

Converts an id value to the appropriate type for a domain class.

static void enhanceProxy(org.hibernate.proxy.HibernateProxy proxy)

static void enhanceProxyClass(java.lang.Class proxyClass)

static void enhanceSessionFactories(org.springframework.context.ApplicationContext ctx, java.lang.Object grailsApplication, java.lang.Object source = null)

static java.lang.Object enhanceSessionFactory(org.hibernate.SessionFactory sessionFactory, GrailsApplication application, org.springframework.context.ApplicationContext ctx)

static java.lang.Object enhanceSessionFactory(org.hibernate.SessionFactory sessionFactory, GrailsApplication application, org.springframework.context.ApplicationContext ctx, java.lang.String suffix, java.util.Map datastores, java.lang.Object source = null)

static java.util.Map filterQueryArgumentMap(java.util.Map query)

static void handleDataAccessException(org.springframework.orm.hibernate3.HibernateTemplate template, org.springframework.dao.DataAccessException e)

Session should no longer be flushed after a data access exception occurs (such a constriant violation)

static void handleLazyProxy(GrailsDomainClass domainClass, GrailsDomainClassProperty property)

This method overrides a getter on a property that is a Hibernate proxy in order to make sure the initialized object is returned hence avoiding Hibernate proxy hell.

static java.lang.Object shouldFlush(GrailsApplication application, java.util.Map map = [:])

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Property Detail

LAZY_PROPERTY_HANDLER

static final java.lang.Object LAZY_PROPERTY_HANDLER


LOG

static final org.apache.commons.logging.Log LOG


RELOAD_RETRY_LIMIT

static final int RELOAD_RETRY_LIMIT


doWithDynamicMethods

static final java.lang.Object doWithDynamicMethods


doWithSpring

static java.lang.Object doWithSpring


onChange

static final java.lang.Object onChange


 
Method Detail

convertValueToIdentifierType

static java.lang.Object convertValueToIdentifierType(java.lang.Object grailsDomainClass, java.lang.Object idValue)
Converts an id value to the appropriate type for a domain class.
Parameters:
grailsDomainClass - a GrailsDomainClass
idValue - an value to be converted
Returns:
the idValue parameter converted to the type that grailsDomainClass expects its identifiers to be


enhanceProxy

static void enhanceProxy(org.hibernate.proxy.HibernateProxy proxy)


enhanceProxyClass

static void enhanceProxyClass(java.lang.Class proxyClass)


enhanceSessionFactories

static void enhanceSessionFactories(org.springframework.context.ApplicationContext ctx, java.lang.Object grailsApplication, java.lang.Object source = null)


enhanceSessionFactory

static java.lang.Object enhanceSessionFactory(org.hibernate.SessionFactory sessionFactory, GrailsApplication application, org.springframework.context.ApplicationContext ctx)


enhanceSessionFactory

static java.lang.Object enhanceSessionFactory(org.hibernate.SessionFactory sessionFactory, GrailsApplication application, org.springframework.context.ApplicationContext ctx, java.lang.String suffix, java.util.Map datastores, java.lang.Object source = null)


filterQueryArgumentMap

static java.util.Map filterQueryArgumentMap(java.util.Map query)


handleDataAccessException

static void handleDataAccessException(org.springframework.orm.hibernate3.HibernateTemplate template, org.springframework.dao.DataAccessException e)
Session should no longer be flushed after a data access exception occurs (such a constriant violation)


handleLazyProxy

static void handleLazyProxy(GrailsDomainClass domainClass, GrailsDomainClassProperty property)
This method overrides a getter on a property that is a Hibernate proxy in order to make sure the initialized object is returned hence avoiding Hibernate proxy hell.


shouldFlush

static java.lang.Object shouldFlush(GrailsApplication application, java.util.Map map = [:])


 

Groovy Documentation