org.codehaus.groovy.grails.orm.hibernate.proxy
Class GroovyAwareJavassistProxyFactory
java.lang.Object
org.codehaus.groovy.grails.orm.hibernate.proxy.GroovyAwareJavassistProxyFactory
- All Implemented Interfaces:
- Serializable, org.hibernate.proxy.ProxyFactory
public class GroovyAwareJavassistProxyFactory
- extends Object
- implements org.hibernate.proxy.ProxyFactory, Serializable
Hibernate's default proxying mechanism proxies Groovy's getMetaClass() method. To avoid this
we customize the proxying creation proxy here and in #GroovyAwareJavassistLazyInitializer.
- Since:
- 1.1.1
- Author:
- Graeme Rocher
- See Also:
- Serialized Form
Method Summary |
org.hibernate.proxy.HibernateProxy |
getProxy(Serializable id,
org.hibernate.engine.SessionImplementor session)
|
void |
postInstantiate(String entityName,
Class persistentClass,
Set interfaces,
Method getIdentifierMethod,
Method setIdentifierMethod,
org.hibernate.type.AbstractComponentType componentIdType)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NO_CLASSES
protected static final Class<?>[] NO_CLASSES
GroovyAwareJavassistProxyFactory
public GroovyAwareJavassistProxyFactory()
postInstantiate
public void postInstantiate(String entityName,
Class persistentClass,
Set interfaces,
Method getIdentifierMethod,
Method setIdentifierMethod,
org.hibernate.type.AbstractComponentType componentIdType)
throws org.hibernate.HibernateException
- Specified by:
postInstantiate
in interface org.hibernate.proxy.ProxyFactory
- Throws:
org.hibernate.HibernateException
getProxy
public org.hibernate.proxy.HibernateProxy getProxy(Serializable id,
org.hibernate.engine.SessionImplementor session)
throws org.hibernate.HibernateException
- Specified by:
getProxy
in interface org.hibernate.proxy.ProxyFactory
- Throws:
org.hibernate.HibernateException