public class TupleFieldSetMapper extends java.lang.Object implements org.springframework.batch.item.file.mapping.FieldSetMapper<Tuple>
FieldSetMapper implementation intended to allow a user use a Tuple as the item. By default, all
fields of the FieldSet will be mapped as Strings. To use type specific mapping, provide a map of field names
to FieldSetType. You are not required to map all fields if using type specific mappings (only the ones that
matter).| Constructor and Description |
|---|
TupleFieldSetMapper() |
| Modifier and Type | Method and Description |
|---|---|
Tuple |
mapFieldSet(org.springframework.batch.item.file.transform.FieldSet fieldSet) |
void |
setDateFormat(java.text.DateFormat formatter)
The
DateFormat used by the resulting Tuple instance returned when converting strings to Dates. |
void |
setTypes(java.util.Map<java.lang.String,FieldSetType> types)
A map of
FieldSet field names to FieldSetType. |
public Tuple mapFieldSet(org.springframework.batch.item.file.transform.FieldSet fieldSet) throws org.springframework.validation.BindException
mapFieldSet in interface org.springframework.batch.item.file.mapping.FieldSetMapper<Tuple>org.springframework.validation.BindExceptionpublic void setDateFormat(java.text.DateFormat formatter)
DateFormat used by the resulting Tuple instance returned when converting strings to Dates.formatter - The format any dates provided will be in.public void setTypes(java.util.Map<java.lang.String,FieldSetType> types)
FieldSet field names to FieldSetType.types - mapping of field names to data types