Issue Details (XML | Word | Printable)

Key: BATCH-631
Type: Improvement Improvement
Status: Closed Closed
Resolution: Duplicate
Priority: Minor Minor
Assignee: Unassigned
Reporter: Markus Thielen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Spring Batch

Getting the raw line from FlatFileItemReader/LineTokenizer

Created: 17/May/08 06:05 PM   Updated: 26/Sep/08 06:44 AM
Component/s: Infrastructure
Affects Version/s: 1.0.1
Fix Version/s: None

Time Tracking:
Not Specified


 Description  « Hide
I needed the current raw line from the underlying input resource when processing flatfiles. Therefore i subclassed DelimitedLineTokenizer to have a getter for the last read line. Dont think this was a clean way to do though. Might be interesting to others. See my attached subclass in #BATCH-630.

 All   Comments   Work Log   Change History   FishEye   Related Builds      Sort Order: Ascending order - Click to sort in descending order
Robert Kasanicky added a comment - 19/May/08 02:56 AM
Can you explain what your usecase is? It seems you need to work with both the raw line and its FieldSet representation at the same time, but I don't understand why.

Markus Thielen added a comment - 19/May/08 12:44 PM
Hi again,
I really work with the FieldSet which itself is exactly what i need. I am mapping the FieldSet to multiple domain objects via Dozer (which btw is a great complementary product to spring batch). The DO's are then saved via hibernate. I also save the raw line within one domainobject to hibernate to trace the origin of the resulting data. Its much easier to do investigation on problems when the raw line is in a sql table, too.

Robert Kasanicky added a comment - 26/Sep/08 06:44 AM
BATCH-719 addresses this same problem