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

Used by HibernateGrailsPlugin to implement the core parts of GORM.

Authors:
Graeme Rocher
Since:
1.1 Created: Jan 13, 2009


Property Summary
static java.lang.Object LAZY_PROPERTY_HANDLER

static Log LOG

static java.lang.Object doWithDynamicMethods

static java.lang.Object doWithSpring

static java.lang.Object hibConfigClass

static java.lang.Object hibProps

 
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(HibernateProxy proxy)

static void enhanceProxyClass(java.lang.Class proxyClass)

static java.lang.Object enhanceSessionFactory(SessionFactory sessionFactory, GrailsApplication application, ApplicationContext ctx)

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

static void handleDataAccessException(HibernateTemplate template, 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 initializeDomain(java.lang.Class c)

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

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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 Log LOG


doWithDynamicMethods

static final java.lang.Object doWithDynamicMethods


doWithSpring

static java.lang.Object doWithSpring


hibConfigClass

static java.lang.Object hibConfigClass


hibProps

static java.lang.Object hibProps


 
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(HibernateProxy proxy)


enhanceProxyClass

static void enhanceProxyClass(java.lang.Class proxyClass)


enhanceSessionFactory

static java.lang.Object enhanceSessionFactory(SessionFactory sessionFactory, GrailsApplication application, ApplicationContext ctx)


filterQueryArgumentMap

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


handleDataAccessException

static void handleDataAccessException(HibernateTemplate template, 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


initializeDomain

static java.lang.Object initializeDomain(java.lang.Class c)


shouldFlush

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


 

Groovy Documentation