Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

    java.lang.Object
      org.codehaus.groovy.grails.orm.hibernate.proxy.HibernateProxyHandler

All Implemented Interfaces:
  ProxyHandler

    public class HibernateProxyHandler

extends Object
implements ProxyHandler

Implementation of the ProxyHandler interface for Hibernate.

Since:
  1.2.2
Author:
  Graeme Rocher

Constructor Summary
`HibernateProxyHandler()`

Method Summary
`org.hibernate.proxy.HibernateProxy` | `getAssociationProxy(Object obj, String associationName)`
`void` | `initialize(Object o)` Initializes an existing uninitialized proxy instance.
`boolean` | `isInitialized(Object o)` Returns whether a lazy proxied instance has been initialized.
`boolean` | `isInitialized(Object obj, String associationName)` Tests whether an association of the given object has been initialized.
`boolean` | `isProxy(Object o)` Returns true if the specified object is a proxy.
`Object` | `unwrapIfProxy(Object instance)` Returns the unwrapped proxy instance or the original object if not proxied.
`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(Object o)

  Description copied from interface: `ProxyHandler`
  Returns whether a lazy proxied instance has been initialized.

  Specified by:
    `isInitialized` in interface `ProxyHandler`
  Parameters:
    `o` - The instance to test
  Returns:
    True if it has been initialized false otherwise

### isInitialized

    public boolean isInitialized(Object obj,
                                 String associationName)

  Description copied from interface: `ProxyHandler`
  Tests whether an association of the given object has been initialized.

  Specified by:
    `isInitialized` in interface `ProxyHandler`
  Parameters:
    `obj` - The object to check
    `associationName` - The association
  Returns:
    True if has been init

### unwrapIfProxy

    public Object unwrapIfProxy(Object instance)

  Description copied from interface: `ProxyHandler`
  Returns the unwrapped proxy instance or the original object if not proxied.

  Specified by:
    `unwrapIfProxy` in interface `ProxyHandler`
  Parameters:
    `instance` - The instance to unwrap
  Returns:
    The unwrapped instance

### unwrapProxy

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

### getAssociationProxy

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

### isProxy

    public boolean isProxy(Object o)

  Description copied from interface: `ProxyHandler`
  Returns true if the specified object is a proxy.

  Specified by:
    `isProxy` in interface `ProxyHandler`
  Parameters:
    `o` - The object in question
  Returns:
    True if it is a proxy

### initialize

    public void initialize(Object o)

  Description copied from interface: `ProxyHandler`
  Initializes an existing uninitialized proxy instance.

  Specified by:
    `initialize` in interface `ProxyHandler`
  Parameters:
    `o` - The proxy instance

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD