List of usage examples for org.springframework.batch.item ExecutionContext getDouble
public double getDouble(String key, double defaultDouble)
From source file:be.ordina.springbatch.batch.writer.FineInformationWriter.java
private void upTheTally(Fine fine) { ExecutionContext executionContext = stepExecution.getExecutionContext(); executionContext.put(fine.getLicensePlate().getType().name(), executionContext.getInt(fine.getLicensePlate().getType().name(), 0) + 1); executionContext.put("total", executionContext.getDouble("total", 0L) + fine.getAmountToPay()); if (fine.isGraveError()) { executionContext.put("graveErrors", executionContext.getInt("graveErrors", 0) + 1); }//from w w w. j a v a 2 s . c o m }