Hello All,

 

Currently I see that the field element definition looks like this:

 

<!ATTLIST field
    name           CDATA  #REQUIRED
    type           CDATA  #IMPLIED
    required       ( true | false )  "false"
    direct         ( true | false )  "false"
    lazy           ( true | false )  "false"
    handler        CDATA  #IMPLIED
    get-method     CDATA  #IMPLIED
    set-method     CDATA  #IMPLIED
    has-method     CDATA    #IMPLIED
    create-method  CDATA  #IMPLIED
    transient      (true|false) "false"
    container      ( true | false ) #IMPLIED
    collection     ( array | arraylist | vector | hashtable | collection | set | map | enumerate )  #IMPLIED>

 

 

I was hoping that I would find a "default-value" attribute defined here as well that would drive the castor engine to not marshall out fields values that match "default-value".  The reason I'm looking for something like this is for efficiency gains.  My thinking is that if I have a million small objects that usually have 80% of their fields initialized correctly from construction there is no point in calling setWhateverField(false) the 800,000 extra times. 

 

Hopefully I've provided enough information above as to what it is I'm looking for, but if there is confusion please let me know and I'll elaborate.  I've looked around the FAQs, Manuals, etc. and have not seen anything besides writing a custom Handler that would solve this problem.  Did I just miss it?

 

Thanks for your help!

 

Aaron Richardson

Reply via email to