Class DefaultLineMapper<T>
java.lang.Object
org.springframework.batch.item.file.mapping.DefaultLineMapper<T>
- Type Parameters:
- T- type of the item
- All Implemented Interfaces:
- LineMapper<T>,- org.springframework.beans.factory.InitializingBean
public class DefaultLineMapper<T>
extends Object
implements LineMapper<T>, org.springframework.beans.factory.InitializingBean
Two-phase 
LineMapper implementation consisting of tokenization of the line into
 FieldSet followed by mapping to item. If finer grained control of exceptions is
 needed, the LineMapper interface should be implemented directly.- Author:
- Robert Kasanicky, Lucas Ward
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidImplementations must implement this method to map the provided line to the parameter type T.voidsetFieldSetMapper(FieldSetMapper<T> fieldSetMapper) voidsetLineTokenizer(LineTokenizer tokenizer) 
- 
Constructor Details- 
DefaultLineMapperpublic DefaultLineMapper()
 
- 
- 
Method Details- 
mapLineDescription copied from interface:LineMapperImplementations must implement this method to map the provided line to the parameter type T. The line number represents the number of lines into a file the current line resides.- Specified by:
- mapLinein interface- LineMapper<T>
- Parameters:
- line- to be mapped
- lineNumber- of the current line
- Returns:
- mapped object of type T
- Throws:
- Exception- if error occurred while parsing.
 
- 
setLineTokenizer
- 
setFieldSetMapper
- 
afterPropertiesSetpublic void afterPropertiesSet()- Specified by:
- afterPropertiesSetin interface- org.springframework.beans.factory.InitializingBean
 
 
-