|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ojb.broker.core.proxy.AbstractProxyFactory
Abstract implementation for the ProxyFactory
| Constructor Summary | |
AbstractProxyFactory()
|
|
| Method Summary | |
ManageableCollection |
createCollectionProxy(PBKey brokerKey,
Query query,
java.lang.Class collectionClass)
Create a Collection Proxy for a given query. |
IndirectionHandler |
createIndirectionHandler(PBKey brokerKey,
Identity id)
Creates a new indirection handler instance. |
CollectionProxy |
getCollectionProxy(java.lang.Object item)
Return CollectionProxy for item is item is a CollectionProxy, otherwise return null |
java.lang.Class |
getCollectionProxyClass()
Returns the collection proxy class. |
IndirectionHandler |
getIndirectionHandler(java.lang.Object obj)
Returns the invocation handler object of the given proxy object. |
java.lang.Class |
getIndirectionHandlerClass()
Returns the indirection handler class. |
java.lang.Class |
getListProxyClass()
Returns the list proxy class. |
static ProxyFactory |
getProxyFactory()
|
java.lang.Class |
getRealClass(java.lang.Object objectOrProxy)
Get the real Class |
java.lang.Object |
getRealObject(java.lang.Object objectOrProxy)
Get the real Object |
java.lang.Object |
getRealObjectIfMaterialized(java.lang.Object objectOrProxy)
Get the real Object for already materialized Handler |
java.lang.Class |
getSetProxyClass()
Returns the set proxy class. |
boolean |
isCollectionProxy(java.lang.Object item)
Reports if item is a CollectionProxy. |
boolean |
isMaterialized(java.lang.Object object)
Determines whether the object is a materialized object, i.e. |
boolean |
isNormalOjbProxy(java.lang.Object proxyOrObject)
Determines whether the given object is an OJB proxy. |
boolean |
isProxy(java.lang.Object proxyOrObject)
Returns true if the given object is a Proxy
or a VirtualProxy instance. |
boolean |
isVirtualOjbProxy(java.lang.Object proxyOrObject)
Determines whether the given object is an OJB virtual proxy. |
void |
setCollectionProxyClass(java.lang.Class collectionProxyClass)
Dets the proxy class to use for generic collection classes implementing the Collection interface. |
void |
setIndirectionHandlerClass(java.lang.Class indirectionHandlerClass)
Sets the indirection handler class. |
void |
setListProxyClass(java.lang.Class listProxyClass)
Dets the proxy class to use for collection classes that implement the List interface. |
void |
setSetProxyClass(java.lang.Class setProxyClass)
Dets the proxy class to use for collection classes that implement the Set interface. |
java.lang.String |
toString(java.lang.Object proxy)
Materialization-safe version of toString. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.ojb.broker.core.proxy.ProxyFactory |
createProxy, getDefaultIndirectionHandlerClass, getIndirectionHandlerBaseClass, interfaceRequiredForProxyGeneration |
| Constructor Detail |
public AbstractProxyFactory()
| Method Detail |
public java.lang.Class getIndirectionHandlerClass()
getIndirectionHandlerClass in interface ProxyFactorypublic void setIndirectionHandlerClass(java.lang.Class indirectionHandlerClass)
setIndirectionHandlerClass in interface ProxyFactoryindirectionHandlerClass - The class for indirection handlers
public IndirectionHandler createIndirectionHandler(PBKey brokerKey,
Identity id)
createIndirectionHandler in interface ProxyFactorybrokerKey - The associated PBKey.id - The subject's ids
public java.lang.Class getListProxyClass()
getListProxyClass in interface ProxyFactorypublic void setListProxyClass(java.lang.Class listProxyClass)
List interface.
Notes that the proxy class must implement the List interface, and have a constructor
of the signature (PBKey, Class, Query).
setListProxyClass in interface ProxyFactorylistProxyClass - The proxy classpublic java.lang.Class getSetProxyClass()
getSetProxyClass in interface ProxyFactorypublic void setSetProxyClass(java.lang.Class setProxyClass)
Set interface.
setSetProxyClass in interface ProxyFactorysetProxyClass - The proxy classpublic java.lang.Class getCollectionProxyClass()
getCollectionProxyClass in interface ProxyFactorypublic void setCollectionProxyClass(java.lang.Class collectionProxyClass)
Collection interface.
setCollectionProxyClass in interface ProxyFactorycollectionProxyClass - The proxy class
public ManageableCollection createCollectionProxy(PBKey brokerKey,
Query query,
java.lang.Class collectionClass)
createCollectionProxy in interface ProxyFactorybrokerKey - The key of the persistence brokerquery - The querycollectionClass - The class to build the proxy for
public final java.lang.Object getRealObject(java.lang.Object objectOrProxy)
getRealObject in interface ProxyFactoryobjectOrProxy -
public java.lang.Object getRealObjectIfMaterialized(java.lang.Object objectOrProxy)
getRealObjectIfMaterialized in interface ProxyFactoryobjectOrProxy -
public java.lang.Class getRealClass(java.lang.Object objectOrProxy)
getRealClass in interface ProxyFactoryobjectOrProxy -
public boolean isNormalOjbProxy(java.lang.Object proxyOrObject)
isNormalOjbProxy in interface ProxyFactorytrue if the object is an OJB proxypublic boolean isVirtualOjbProxy(java.lang.Object proxyOrObject)
isVirtualOjbProxy in interface ProxyFactorytrue if the object is an OJB virtual proxypublic boolean isProxy(java.lang.Object proxyOrObject)
Proxy
or a VirtualProxy instance.
isProxy in interface ProxyFactorypublic IndirectionHandler getIndirectionHandler(java.lang.Object obj)
getIndirectionHandler in interface ProxyFactoryobj - The object
null
otherwisepublic boolean isMaterialized(java.lang.Object object)
isMaterialized in interface ProxyFactoryobject - The object to test
true if the object is materializedpublic CollectionProxy getCollectionProxy(java.lang.Object item)
getCollectionProxy in interface ProxyFactorypublic boolean isCollectionProxy(java.lang.Object item)
isCollectionProxy in interface ProxyFactorypublic java.lang.String toString(java.lang.Object proxy)
toString in interface ProxyFactoryproxy - The object for which a string representation shall be generated
public static ProxyFactory getProxyFactory()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||