I was wondering if castor supports proxy objects?.  I can't seem to find any
mention of this topic anywhere in the docs, nor in the mailing lists (after
googling it).

I mainly want to use it for displaying search results, as I don't want to
castor to have to load the full objects.

Will future versions of castor support proxy objects, if they are not
currently supported? I guess I could make a seperate object sharing the same
table as the proxied object, and then have the proxy object call castor to
get the full object, but it makes it that much more messy

-------------
What I envision:

Have an interface org.exolab.castor.jdo.ProxyObject which just has the
methods setProxy() and isProxy(). isProxy() is true if the instance is a
proxyObject, false if is the proxiedObject.

Add a method to the OQLQuery object like query.executeProxied() which does
exactly the same as a normal query.execute() except it returns the proxy
objects instead. If no proxy objects specified for the results, then just
return the full object like normal.

Add an extra attribute in the mapping files for the feilds, <field ....
isProxy /> to indicate whether this field is included in the proxy object
(others just ignored). Identity feild included by default.
and an extra attribute to the class mapping <class .... isProxy /> to
determine whether this particular class has a proxy object (maybe sub/super
classes don't. Allows reuse of mapping files)

Add a method getProxiedObject(ProxyObject obj) in interface Database, which
returns the proxied object. Implementation uses the identity feild to
identitify object.

Comments ?? or am I just insane?

Thanks,
Bert.





_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to