Hi, Nick.
 
Search for a file called castorbuilder.properties (it may be included in the castor jar file). There you should find these lines:

# Set to true if you want the generated source code to contain
# Extra methods for the collection fields, such as get/set using
# the collection type in addition to the type-safe array.
# Set this to true if you want your code to be more compatible
# with Castor JDO. This is false by default.
#
# org.exolab.castor.builder.extraCollectionMethods=true
 
Just see it setting this to true will help you.
 
Hiran
 
 
----- Original Message -----
Sent: Tuesday, April 01, 2003 6:26 PM
Subject: [castor-dev] accessing member collections using Castor-XML code generation

 

Hi,

 

If I have an xsd file with one complex type which contains a collection of another type, when I generate code, I get a bunch of access methods, like

 

public void addMarbles()

public Enumeration enumerateMarbles()

public int getMarblesCount()

 

etc. etc.  Is there some setting I can use that will generate code that just returns the private member variable, i.e.

 

public Vector getMarbles() { return this._marbles; }

 

 

Thanks,

Nick

 

Reply via email to