List of usage examples for org.springframework.batch.item.file.transform FieldSet readInt
int readInt(String name, int defaultValue);
int' value from column with given 'name', using the supplied defaultValue if the field value is blank. From source file:no.magott.training.ex1.SpursMatchFieldSetMapper.java
@Override public SpursMatch mapFieldSet(FieldSet fieldSet) throws BindException { int matchId = fieldSet.readInt("MatchId", 0); String day = fieldSet.readString("Day"); String competition = fieldSet.readString("Competition"); String opposition = fieldSet.readString("Opposition"); String venue = fieldSet.readString("Venue"); String halfTimeScore = fieldSet.readString("HalfTimeScore"); int spursGoals = fieldSet.readInt("SpursGoals", 0); int oppositionGoals = fieldSet.readInt("OppositionGoals", 0); Date date = fieldSet.readDate("Date", "MMM d, yyyy", null); return new SpursMatch(matchId, day, date, competition, opposition, venue, halfTimeScore, spursGoals, oppositionGoals);/*from ww w. j av a2 s .c o m*/ }