handler = new org.exolab.castor.xml.XMLFieldHandler() {
@Override
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Insurant target = (Insurant) object;
if (!target.hasPolicyNumber()) { return null; }
return new java.lang.Long(target.getPolicyNumber());
}
@Override
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
Insurant target = (Insurant) object;
// ignore null values for non optional primitives
if (value == null) { return; }
target.setPolicyNumber( ((java.lang.Long) value).longValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
@Override