class BigDecimalDataConverter implements DataConverter<BigDecimal> {

    @Override
    public BigDecimal stringToValue(String rawData) throws ParseException{
        if(StringUtils.isNotEmpty(rawData)) {
            BigDecimal value = new BigDecimal(rawData.replace(",", ".")).stripTrailingZeros();
            if (value.scale() < 0)
                return value.setScale(0);
            return value;
        }
        return null;
    }

}