Hello,

Thanks but I know how to marshall an ArrayList.

My problem is that my ArrayList contains references. 
(So during unmarshalling they will never to be instantiated but 
just some references to be set.)

It is like:
1. you have a Pool of objects
2. you have a list of SelectedObjects (and here you hold only 
references to the other list's elements)

But without a mapping file the unmarshalling produces new instances 
in the SelectedObjects list (with the same atribute values of course) 
not references.

rgds,
Peter


> ----------
> Von:  Neil Blue[SMTP:[EMAIL PROTECTED]]
> Antwort an:   [EMAIL PROTECTED]
> Gesendet:     Donnerstag, 21. November 2002 12:35
> An:   [EMAIL PROTECTED]
> Betreff:      Re: [castor-dev] references in collections
> 
> I am not sure what your question is asking Szabo, but it is possible to
> have
> an attribute with a collection of objects. You will need to set the
> attribute type to the class of object in the collection and set the
> collection attribute to arraylist.
> 
> Neil
> 
> -----Original Message-----
> From: Szabo Peter [mailto:[EMAIL PROTECTED]]
> Sent: 21 November 2002 11:17
> To: [EMAIL PROTECTED]
> Subject: [castor-dev] references in collections
> 
> 
> Hello,
> 
> We are thinking about how to write a mapping file (section) to describe a
> collection (ArrayList) which contains a set of objects which are
> references
> to an other part of our (to be marshalled too) modell.
> 
> Eg:
> class A has a
> private ArraList theList; //This list contains objects of type B.
> with getter/setter
> 
> And in a larger view we have a type C which contains a lot of things,
> among
> them a pool of type B, and possibly one-or-more type A (and here the list
> points to some items of our pool).
> 
> class C has
> private ArrayList cPool; // here are a lot of stuff of type C
> private A pointerHolder; // that's of type A, and contains references to
> the
> C instances in the pool
> ...
> 
> I hope it is clear enough to get some hints.
> 
> thanks in advance,
>       Peter
> 
> ----------------------------------------------------------- 
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev
> 
> ----------------------------------------------------------- 
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev
> 

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to