db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian McCallister <mccallis...@forthillcompany.com>
Subject Re: PersistentField Problems
Date Thu, 03 Jul 2003 22:39:45 GMT

On Thursday, July 3, 2003, at 01:21 PM, Thomas Mahler wrote:

> I think making it pluggable at the global level is sufficient. The 
> scenario you describe is not very common and using a staged 
> implementation does'nt sound so bad for me.

I don't know if you want to include this in OJB or not but the 
necessary class is attached.


It checks for a field that matches its requirements, then a property, 
then a DynaProperty (or rather, just checks to see if it is a DynaBean).

If it matches on one of the above (in the order listed) it will 
instantiate and wrap the appropriate PersistentFieldImpl [Default | 
Property | DynaBean]. Once it has identified the correct implementation 
to use it caches this info so it shouldn't have to go through the (ugly 
in my opinion) series of switches on exceptions more than once per 
class/field combo.

This class allows the mixing of different types on a single class. You 
can have fields for some properties, and getXXX/setXXX for others (or 

It's error reporting isn't ideal yet - but I don't think that if this 
is accepted it should be documented for 1.0 anyway at this late a date.


View raw message