db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Taal <mt...@springsite.com>
Subject Re: cvs commit: db-ojb/src/java/org/apache/ojb/broker/accesslayer CollectionFactory.java
Date Fri, 15 Apr 2005 00:26:45 GMT
Hi Thomas,
You see I am really watching this topic :-).

I looked at the CollectionFactory source you checked in and was 
wondering if it was also possible to let the owner (the parent object) 
of the collection be also passed to the createCollection methods in the 
factory? The whole reason that I brought up the point of the 
CollectionFactory is that I need the owner object during collection 
construction. A collection factory is especially meaningfull in case 
runtime information is required when creating the collection. However 
the collection factory you checked in only allows the passing of more 
static configuration information (i.e. collectiondescriptor). Or did I 
miss something here?

You mention in the javadoc that collections should have a zero-argument 
constructor because the collection proxies
create the collection on their own. However, if the collection classes 
should required to be creatable by ojb code (and not by the factory) 
then there is no real need for a CollectionFactory. If that restriction 
applies then imo the CollectionFactory does not add more functionality 
than the current CollectionClass attribute in the CollectionDescriptor.
Please correct me if I am wrong.

Sorry if my reaction is to quick, this specific feature is kind of 
important for me that's why...

gr. Martin

tomdz@apache.org wrote:
> tomdz       2005/04/14 13:58:12
> 
>   Modified:    src/java/org/apache/ojb/broker/accesslayer
>                         CollectionFactory.java
>   Log:
>   Additional javadoc
>   
>   Revision  Changes    Path
>   1.2       +5 -2      db-ojb/src/java/org/apache/ojb/broker/accesslayer/CollectionFactory.java
>   
>   Index: CollectionFactory.java
>   ===================================================================
>   RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/CollectionFactory.java,v
>   retrieving revision 1.1
>   retrieving revision 1.2
>   diff -u -r1.1 -r1.2
>   --- CollectionFactory.java	14 Apr 2005 19:56:54 -0000	1.1
>   +++ CollectionFactory.java	14 Apr 2005 20:58:12 -0000	1.2
>   @@ -23,7 +23,10 @@
>    
>    /**
>     * Base interface for factories that create collections instances for
>   - * read collection-descriptors and queries.
>   + * read collection-descriptors and queries. Please note that the collection instances
>   + * are not create exclusively here (though the collection type always comes from this
>   + * factory), e.g. collection proxies create the collection on their own. Therefore
>   + * collection classes are required to have a no-arg constructor (or the default one).
>     *  
>     * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak<a>
>     * @version $Id$
>   
>   
>   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 
> 

-- 

With Regards, Martin Taal

Springsite
Barchman Wuytierslaan 72b
3818 LK Amersfoort
tel: +31 (0)33 462 02 07
fax: +31 (0)33 463 77 12
Mobile: +31 (0)6 288 48 943
email: mtaal@springsite.com
web: www.springsite.com

---------------------------------------------------------------------
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