db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Dudziak <tom...@gmail.com>
Subject Re: cvs commit: db-ojb/src/java/org/apache/ojb/broker/accesslayer CollectionFactory.java
Date Fri, 15 Apr 2005 09:25:00 GMT
On 4/15/05, Martin Taal <mtaal@springsite.com> wrote:
> Here are some other thoughts about the collections in ojb. Hopefully
> they are of use to you (otherwise ignore them):
> 
> One thing which I noted is that for user-collection class it actually
> makes more sense to implement the TrackingCollection interface instead
> of the ManageableCollection interface. In the documentation of ojb
> however only the ManageableCollection is mentioned while it is not
> removal aware (which I think is very important).
> 
> Also the ManageableCollection interface only adds methods which are
> basically also offered by the Collection interface. Eventhough a
> user-defined collection should support the ManageableCollection the
> CollectionProxy class also assumes that the user-collectionclass is a
> valid java collection (when I look in the source code).
> Maybe it would make more sense for user-defined collection classes to
> support the java.util.collection interface and if it should be removal
> aware also the TrackingCollection. The manageablecolleciton is then not
> required anymore (maybe only for backward compatibility).

Don't know, the introduction of TrackingCollection is quite new (Jakob
refactored these a few weeks ago). IMO it makes more sense to leave
that to the user. Internally OJB only needs ManageableCollection, the
removal-aware stuff is convenience for the user.

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message