Did this mail ever reach out to ppl ? Any help on this would be much appreciated. Thanks,
-----Forwarded Message----- > From: Harshawardhan Gadgil <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: [castor-dev] Re: Using hashtable instead of Vector > Date: Tue, 27 Apr 2004 20:01:03 -0500 > > > Not sure if this mail got posted correctly since I sent the mail before > I got confirmation for my subscription to the mailing list. Hence > re-posting this. > > Ok, I've explained the problem in more detail below. Any tips would be > appreciated. > ------------------------- > It seems that by default Castor src. generator puts multiple elements > into a vector i.e. for a schema as follows > > <?xml version='1.0'?> > <schema xmlns="http://www.w3.org/2001/XMLSchema"> > <element name="test"> > <complexType> > <sequence> > <element name="params" minOccurs="0" > maxOccurs="unbounded"/> > </sequence> > </complexType> > </element> > </schema> > > I would get something like > > .. > > public class Test implements java.io.Serializable { > > > //--------------------------/ > //- Class/Member Variables -/ > //--------------------------/ > > /** > * Field _paramsList > */ > private java.util.Vector _paramsList; > > ... > } > > Is there a way to tell the source generator to create params as a > java.util.Hashtable instead of java.util.Vector. > > I tried using collections attribute etc.. but could not get it to work. > I believe there are some ways to get around this by using a mapping file > e.g. > ftp://ftp.exolab.org/pub/castor/examples/CastorXML/HashMaps/example1.zip > > In this case how do I specify the schema for the object. I tried setting > the type to java.util.Hashtable and hashtable but this won't work. > > Any help would be much appreciated. > ------------------------- > > > Thanks, -- Harshawardhan Gadgil <[EMAIL PROTECTED]> Community Grid Labs
