public static BigDecimal parseBigDecimalForEntity(String bigDecimalString) throws NumberFormatException {
  if (bigDecimalString == null) {
    return null;
  }
  bigDecimalString=bigDecimalString.trim();
  bigDecimalString=bigDecimalString.replaceAll(",","");
  if (bigDecimalString.length() < 1) {
    return null;
  }
  return new BigDecimal(bigDecimalString);
}

public static BigDecimal parseBigDecimalForEntity ( String bigDecimalString ) throws NumberFormatException { if ( bigDecimalString == null ) { return null ; } bigDecimalString = bigDecimalString . trim ( ) ; bigDecimalString = bigDecimalString . replaceAll ( "," , "" ) ; if ( bigDecimalString . length ( ) < 1 ) { return null ; } return new BigDecimal ( bigDecimalString ) ; }
return nulls for empty strings , as the entity engine can deal with nulls . this will provide blanks in fields where bigdecimal display . blank meaning null , vs . 0 which means 0
