Hi,
Instead of using a FieldHandler, I prefer performing the mapping in the getter/setter like :


protected final static String PERMITTED = "Permitted";

protected final static String DENY = "Deny";

protected String myField;

public void setFooBoolean(boolean _boolean)
{
      // May be the contrary...
       myField = _boolean ? PERMITTED : DENY;
}

public boolean getFooBoolean()
{
   // May be the contrary...
   return myField.equals(PERMITTED);
}

I don't know if it is a correct way (May be not ?) but it works and is less costing.
Hope it will be helpful.
Best regards,
St�phane.



Gawde, Kiran a �crit :

Hi,
How can I use FieldHandler? I need to map a java.lang.Boolean field to string ("Deny" or "Permitted"). Any samples?
Thanks,
Kiran Gawde


------------------------------------------------------------------------

----------------------------------------------------------- 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