|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Factory class for creating instances of the indirection handler used by OJB's proxies, and for the collection proxies.
Method Summary | |
ManageableCollection |
createCollectionProxy(PBKey brokerKey,
Query query,
java.lang.Class collectionClass)
Create a Collection Proxy for a given context. |
IndirectionHandler |
createIndirectionHandler(PBKey pbKey,
Identity id)
Creates a new indirection handler instance. |
OJBProxy |
createProxy(java.lang.Class baseClass,
IndirectionHandler handler)
|
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. |
java.lang.Class |
getDefaultIndirectionHandlerClass()
Returns the class of a default IndirectionHandler that can be used for this implementaiton if now IndirectionHandlerClass implementation is given. |
IndirectionHandler |
getIndirectionHandler(java.lang.Object obj)
Returns the invocation handler object of the given proxy object. |
java.lang.Class |
getIndirectionHandlerBaseClass()
Returns the class of the base class that the given IndirectionHandler must extend/implement |
java.lang.Class |
getIndirectionHandlerClass()
Returns the indirection handler class. |
java.lang.Class |
getListProxyClass()
Returns the list proxy class. |
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 |
interfaceRequiredForProxyGeneration()
Method that returns whether or not this ProxyFactory can generate reference Proxies for classes regardless if they extend an interface or not. |
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. |
Method Detail |
public java.lang.Class getIndirectionHandlerClass()
public void setIndirectionHandlerClass(java.lang.Class indirectionHandlerClass)
indirectionHandlerClass
- The class for indirection handlerspublic java.lang.Class getDefaultIndirectionHandlerClass()
public java.lang.Class getIndirectionHandlerBaseClass()
public IndirectionHandler createIndirectionHandler(PBKey pbKey, Identity id)
id
- The subject's ids
public java.lang.Class getListProxyClass()
public 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
).
listProxyClass
- The proxy classpublic java.lang.Class getSetProxyClass()
public void setSetProxyClass(java.lang.Class setProxyClass)
Set
interface.
setProxyClass
- The proxy classpublic java.lang.Class getCollectionProxyClass()
public void setCollectionProxyClass(java.lang.Class collectionProxyClass)
Collection
interface.
collectionProxyClass
- The proxy classpublic ManageableCollection createCollectionProxy(PBKey brokerKey, Query query, java.lang.Class collectionClass)
public OJBProxy createProxy(java.lang.Class baseClass, IndirectionHandler handler) throws java.lang.Exception
java.lang.Exception
public java.lang.Object getRealObject(java.lang.Object objectOrProxy)
objectOrProxy
-
public java.lang.Object getRealObjectIfMaterialized(java.lang.Object objectOrProxy)
objectOrProxy
-
public java.lang.Class getRealClass(java.lang.Object objectOrProxy)
objectOrProxy
-
public boolean isNormalOjbProxy(java.lang.Object proxyOrObject)
true
if the object is an OJB proxypublic boolean isVirtualOjbProxy(java.lang.Object proxyOrObject)
true
if the object is an OJB virtual proxypublic boolean isProxy(java.lang.Object proxyOrObject)
Proxy
or a VirtualProxy
instance.
public IndirectionHandler getIndirectionHandler(java.lang.Object obj)
obj
- The object
null
otherwisepublic boolean isMaterialized(java.lang.Object object)
object
- The object to test
true
if the object is materializedpublic CollectionProxy getCollectionProxy(java.lang.Object item)
public boolean isCollectionProxy(java.lang.Object item)
public java.lang.String toString(java.lang.Object proxy)
public boolean interfaceRequiredForProxyGeneration()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |