harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Spark Shen" <smallsmallor...@gmail.com>
Subject Re: [classlib][beans] Code seems duplicate for primitive persistence delegate
Date Fri, 13 Jul 2007 03:11:01 GMT
2007/7/13, Tim Ellison <t.p.ellison@gmail.com>:
>
> 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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message