2007/7/13, Tim Ellison <[EMAIL PROTECTED]>:
Alexei Zakharov wrote: > I don't see many reasons to couple all persistence delegates into a > single class. IMO "one class to one persistence delegate" model is > obvious and easy to understand. Yes, it is. Looking at the method DefaultPersistenceDelegate#createDefaultNameForPersistenceDelegateClass there is a simple 1:1 mapping from type to delegate. > AFAIU RI implements its persistence delegates in this way. I really don't care about that! > BTW what do you mean by code duplication here? > The behavior of instantiate() method is unique to each PD and all that > we can do is to create a single class with a big big switch that > includes the code from all our PDs. Do we really want this? IMHO it is > not an Object-Oriented way. I'm assuming that Spark is not suggesting combining *all* the persistence delegates, just those for the primitive types.
yes, exactly But still,
I'd also be interested to hear how they would be combined.
Please see my comment to Alexei's post. Regards,
Tim
-- Spark Shen China Software Development Lab, IBM
