org.codehaus.groovy.grails.orm.hibernate.proxy
Class HibernateProxyHandler

java.lang.Object
  extended by org.codehaus.groovy.grails.orm.hibernate.proxy.HibernateProxyHandler
All Implemented Interfaces:
org.codehaus.groovy.grails.support.proxy.EntityProxyHandler, org.codehaus.groovy.grails.support.proxy.ProxyHandler

public class HibernateProxyHandler
extends java.lang.Object
implements org.codehaus.groovy.grails.support.proxy.EntityProxyHandler

Implementation of the ProxyHandler interface for Hibernate.

Since:
1.2.2

Constructor Summary
HibernateProxyHandler()
           
 
Method Summary
 org.hibernate.proxy.HibernateProxy getAssociationProxy(java.lang.Object obj, java.lang.String associationName)
           
 java.lang.Class<?> getProxiedClass(java.lang.Object o)
           
 java.lang.Object getProxyIdentifier(java.lang.Object o)
           
 void initialize(java.lang.Object o)
           
 boolean isInitialized(java.lang.Object o)
           
 boolean isInitialized(java.lang.Object obj, java.lang.String associationName)
           
 boolean isProxy(java.lang.Object o)
           
 java.lang.Object unwrapIfProxy(java.lang.Object instance)
           
 java.lang.Object unwrapProxy(org.hibernate.proxy.HibernateProxy proxy)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateProxyHandler

public HibernateProxyHandler()
Method Detail

isInitialized

public boolean isInitialized(java.lang.Object o)
Specified by:
isInitialized in interface org.codehaus.groovy.grails.support.proxy.ProxyHandler

isInitialized

public boolean isInitialized(java.lang.Object obj,
                             java.lang.String associationName)
Specified by:
isInitialized in interface org.codehaus.groovy.grails.support.proxy.ProxyHandler

unwrapIfProxy

public java.lang.Object unwrapIfProxy(java.lang.Object instance)
Specified by:
unwrapIfProxy in interface org.codehaus.groovy.grails.support.proxy.ProxyHandler

unwrapProxy

public java.lang.Object unwrapProxy(org.hibernate.proxy.HibernateProxy proxy)

getAssociationProxy

public org.hibernate.proxy.HibernateProxy getAssociationProxy(java.lang.Object obj,
                                                              java.lang.String associationName)

isProxy

public boolean isProxy(java.lang.Object o)
Specified by:
isProxy in interface org.codehaus.groovy.grails.support.proxy.ProxyHandler

initialize

public void initialize(java.lang.Object o)
Specified by:
initialize in interface org.codehaus.groovy.grails.support.proxy.ProxyHandler

getProxyIdentifier

public java.lang.Object getProxyIdentifier(java.lang.Object o)
Specified by:
getProxyIdentifier in interface org.codehaus.groovy.grails.support.proxy.EntityProxyHandler

getProxiedClass

public java.lang.Class<?> getProxiedClass(java.lang.Object o)
Specified by:
getProxiedClass in interface org.codehaus.groovy.grails.support.proxy.EntityProxyHandler