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

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

Introduction

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

Prototype

char readChar(String name);

Source Link

Document

Read the 'char' value from column with given 'name'.

Usage

From source file:org.openmrs.module.bahmniexports.example.domain.trade.CustomerUpdateFieldSetMapper.java

@Override
public CustomerUpdate mapFieldSet(FieldSet fs) {

    if (fs == null) {
        return null;
    }/*ww w . jav a  2  s.  c o m*/

    CustomerOperation operation = CustomerOperation.fromCode(fs.readChar(0));
    String name = fs.readString(1);
    BigDecimal credit = fs.readBigDecimal(2);

    return new CustomerUpdate(operation, name, credit);

}