}
MonetaryAmount amount;
String creditCardNumber;
String merchantNumber;
SimpleDate date;
try {
amount = MonetaryAmount.valueOf(fields.readString(0));
creditCardNumber = fields.readString(1);
merchantNumber = fields.readString(2);
String[] dates = StringUtils.delimitedListToStringArray(fields.readString(3), "/");
date = new SimpleDate(new Integer(dates[0]), new Integer(dates[1]), new Integer(dates[2]));
} catch (Exception e) {
throw new InvalidBatchException("Cannot parse dining from fields: [" + fields + "]", e);
}
Dining dining = new Dining(amount, creditCardNumber, merchantNumber, date);