org.castor.persist.proxy
Class SingleProxy

java.lang.Object
  extended by org.castor.persist.proxy.SingleProxy
All Implemented Interfaces:
Serializable, net.sf.cglib.proxy.Callback, net.sf.cglib.proxy.MethodInterceptor

public final class SingleProxy
extends Object
implements net.sf.cglib.proxy.MethodInterceptor, Serializable

See Also:
Serialized Form

Method Summary
static Object getProxy(TransactionContext tx, ClassMolder classMolder, Identity identity, Object object, AccessMode accessMode)
          Factory method to create SingleProxy instance.
 Object intercept(Object obj, Method method, Object[] args, net.sf.cglib.proxy.MethodProxy proxy)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getProxy

public static Object getProxy(TransactionContext tx,
                              ClassMolder classMolder,
                              Identity identity,
                              Object object,
                              AccessMode accessMode)
                       throws ObjectNotFoundException
Factory method to create SingleProxy instance.

Parameters:
tx - Actual TransactionContext.
classMolder - Associated ClassMolder.
identity - Identity object.
object - Object to be lazy-loaded.
accessMode - Access mode identifier.
Returns:
A SingleProxy instance.
Throws:
ObjectNotFoundException

intercept

public Object intercept(Object obj,
                        Method method,
                        Object[] args,
                        net.sf.cglib.proxy.MethodProxy proxy)
                 throws Throwable

Specified by:
intercept in interface net.sf.cglib.proxy.MethodInterceptor
Throws:
Throwable
See Also:
#intercept(java.lang.Object, java.lang.reflect.Method, java.lang.Object[], net.sf.cglib.proxy.MethodProxy)


Copyright © 2010. All Rights Reserved.