On Wednesday, February 26, 2003, at 08:32 AM, Arnaud BOULAY wrote:
Rhett, I don't understand the has...() method, can you tell me more please.

The idea is that, for java primitives (int, long, float, boolean, etc.), there is no way to tell the difference between zero (or false) and "not set" by looking at the value of the variable. The has method provides a mechanism to tell the difference: if a has method exists for a field, it is called before the field is marshalled. If the has method returns false, the field is marshalled as though the get method returned null. If the has method returns true, the field is marshalled normally.


(http://castor.exolab.org/list-archive/msg18512.html is Keith's response to the same question back in August. Or http://castor.exolab.org/list-archive/msg19737.html on a similar topic in September.)

Also: I was wrong in my last message when I indicated that there was no way to specify the has method in the field mapping. That feature was added in version 0.9.4.3 -- thanks, Keith.

HTH,
Rhett


-- Rhett Sutphin Research Assistant (Software) Coordinated Laboratory for Computational Genomics and the Center for Macular Degeneration University of Iowa - Iowa City, IA 52242 - USA 4111 MEBRF - email: [EMAIL PROTECTED]

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




Reply via email to