field = new LongFieldImpl( ((Number) value).longValue() );
}
} else if ( valueType == ValueType.PFLOAT_TYPE || valueType == ValueType.FLOAT_TYPE ) {
if( value instanceof String ) {
try {
field = new DoubleFieldImpl( NumberFormat.getInstance().parse( (String) value ).floatValue() );
} catch ( ParseException e ) {
throw new NumberFormatException( "Error parsing number '"+value+"'" );
}
} else {
field = new DoubleFieldImpl( ((Number) value).floatValue() );
}
} else if ( valueType == ValueType.PDOUBLE_TYPE || valueType == ValueType.DOUBLE_TYPE ) {
if( value instanceof String ) {
try {
field = new DoubleFieldImpl( NumberFormat.getInstance().parse( (String) value ).doubleValue() );
} catch ( ParseException e ) {
throw new NumberFormatException( "Error parsing number '"+value+"'" );
}
} else {
field = new DoubleFieldImpl( ((Number) value).doubleValue() );
}
} else if ( valueType == ValueType.PBOOLEAN_TYPE || valueType == ValueType.BOOLEAN_TYPE ) {
if( value instanceof String ) {
field = new BooleanFieldImpl( Boolean.valueOf( (String) value).booleanValue() );
} else {