Example usage for org.springframework.batch.item.file.transform FieldSet readDate

List of usage examples for org.springframework.batch.item.file.transform FieldSet readDate

Introduction

In this page you can find the example usage for org.springframework.batch.item.file.transform FieldSet readDate.

Prototype

Date readDate(String name);

Source Link

Document

Read the java.sql.Date value in given format from column with given name.

Usage

From source file:com.manning.siia.batch.PaymentFieldSetMapper.java

@Override
public Payment mapFieldSet(FieldSet fieldSet) throws BindException {
    Payment payment = new Payment();

    payment.setSourceAccountNo(fieldSet.readString("source"));
    payment.setDestinationAccountNo(fieldSet.readString("destination"));
    payment.setAmount(fieldSet.readBigDecimal("amount"));
    payment.setDate(fieldSet.readDate("date"));

    return payment;
}