org.springframework.batch.item.file
Interface LineMapper<T>
- Type Parameters:
 T - type of the domain object
- All Known Implementing Classes: 
 - DefaultLineMapper, JsonLineMapper, PassThroughLineMapper, PatternMatchingCompositeLineMapper
 
public interface LineMapper<T>
Interface for mapping lines (strings) to domain objects typically used to map lines read from a file to domain objects
 on a per line basis.  Implementations of this interface perform the actual
 work of parsing a line without having to deal with how the line was
 obtained.
- Since:
 
  - 2.0
 
- Author:
 
  - Robert Kasanicky
 
- See Also:
 FieldSetMapper, 
LineTokenizer
| 
Method Summary | 
 T | 
mapLine(String line,
        int lineNumber)
 
          Implementations must implement this method to map the provided line to 
 the parameter type T. | 
 
mapLine
T mapLine(String line,
          int lineNumber)
          throws Exception
- Implementations 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.
- Parameters:
 line - to be mappedlineNumber - of the current line
- Returns:
 - mapped object of type T
 - Throws:
 Exception - if error occured while parsing.
 
 
Copyright © 2013 SpringSource. All Rights Reserved.