return Boolean.valueOf(value);
} else if (type == Date.class) {
try {
return DATE_FORMAT.parse(value);
} catch (ParseException e) {
throw new NestedRuntimeException("Error parsing date. Cause: " + e, e);
}
} else if (type == BigInteger.class) {
return new BigInteger(value);
} else if (type == BigDecimal.class) {
return new BigDecimal(value);