java.lang.Object
ojb.broker.VirtualProxy
- All Implemented Interfaces:
- java.io.Serializable
- public abstract class VirtualProxy
- extends java.lang.Object
- implements java.io.Serializable
Proxy base class. can be used to implement lazy materialization techniques.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
indirectionHandler
private ojb.broker.accesslayer.IndirectionHandler indirectionHandler
- reference to the IndirectionHandler that encapsulates the delegation mechanism
VirtualProxy
public VirtualProxy()
VirtualProxy
public VirtualProxy(Identity oid)
- create a VirtualProxy from an identity
VirtualProxy
public VirtualProxy(java.lang.reflect.InvocationHandler handler)
- create a VirtualProxy from an identity
getIndirectionHandler
public static ojb.broker.accesslayer.IndirectionHandler getIndirectionHandler(VirtualProxy proxy)
alreadyMaterialized
public boolean alreadyMaterialized()
- returns true if the real subject already been loaded
createProxy
public static java.lang.Object createProxy(java.lang.Class proxyClass,
Identity realSubjectsIdentity)
throws java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException
- static factory method creates VirtualProxy instances of a given subclass and an real subjects identity.
getRealSubject
public java.lang.Object getRealSubject()
throws PersistenceBrokerException
- returns the proxies real subject. The subject will be materialized if necessary.
getIdentity
Identity getIdentity()