Announcement Announcement Module
Collapse
No announcement yet.
How to use PassThroughFieldSetMapper Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to use PassThroughFieldSetMapper

    I'm a bit confused as of how to use the PassThroughFieldSetMapper. As I understand, it will pass through the item as is, if it already is a FieldSet. Otherwise, it will simply create a DefaultFieldSet from the toString value of the item. OK, fine.

    Say I connect the PassThroughFieldSetMapper to a FlatFileItemWriter, just as in the third step of the tradeJob sample.

    My question is:
    Why should I use the PassThroughFieldSetMapper if I always get a domain object from the reader? Wouldn't I always want a custom FieldSetCreator?

    Hmmm, I think I get it now. It handles the case where I'm happy with getting the toString representation of the domain object into the file, right? I would have thought that to be a rather special case, like for testing only, but maybe it fits the majority.
Working...
X