public abstract class AbstractProxyFactory extends java.lang.Object implements ProxyFactory
| Constructor and Description |
|---|
AbstractProxyFactory() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateProxy, getDefaultIndirectionHandlerClass, getIndirectionHandlerBaseClass, interfaceRequiredForProxyGenerationpublic java.lang.Class getIndirectionHandlerClass()
getIndirectionHandlerClass in interface ProxyFactorypublic void setIndirectionHandlerClass(java.lang.Class indirectionHandlerClass)
setIndirectionHandlerClass in interface ProxyFactoryindirectionHandlerClass - The class for indirection handlerspublic IndirectionHandler createIndirectionHandler(PBKey brokerKey, Identity id)
createIndirectionHandler in interface ProxyFactorybrokerKey - The associated PBKey.id - The subject's idspublic 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 classpublic 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 forpublic 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 objectnull
otherwisepublic boolean isMaterialized(java.lang.Object object)
isMaterialized in interface ProxyFactoryobject - The object to testtrue 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 generatedpublic static ProxyFactory getProxyFactory()
(C) 2002 - 2005 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30