RESOLVED - BATCH-1147:

*Fixed SimpleChunkProcessor so that the filter count is applied correctly
 *Updated SimpleChunkProcessorTests and CustomerFilterJobFunctionalTests to check the filter count.
This commit is contained in:
dhgarrette
2009-03-13 17:26:50 +00:00
parent b3ba438e1a
commit 9e35519672
4 changed files with 79 additions and 60 deletions

View File

@@ -22,20 +22,25 @@ import org.springframework.batch.item.file.mapping.FieldSetMapper;
import org.springframework.batch.item.file.transform.FieldSet;
/**
* {@link FieldSetMapper} for mapping the
* {@link FieldSetMapper} for mapping to a {@link CustomerUpdate}.
*
* @author Lucas Ward
*
*
*/
public class CustomerUpdateFieldSetMapper implements FieldSetMapper<CustomerUpdate> {
public CustomerUpdate mapFieldSet(FieldSet fs) {
if (fs == null) {
return null;
}
CustomerOperation operation = CustomerOperation.fromCode(fs.readChar(0));
String name = fs.readString(1);
BigDecimal credit = fs.readBigDecimal(2);
return new CustomerUpdate(operation, name, credit);
return new CustomerUpdate(operation, name, credit);
}
}