class BigDecimalTypeConverter implements TypeConverter {

    @Override
    public BigDecimal fromString(Type ignored, String value) {
        try {
            return StringTypeConverter.NULL_LITERAL.equals(value) || value == null ? null : new BigDecimal(value);
        } catch (NumberFormatException e) {
            throw new IllegalArgumentException("Unable convert to a BigDecimal: " + value, e);
        }
    }

}