Actually it is not a composite, it is a wrapper object, an account with orders.
I am a bit blank on how I would implement the driving query pattern for my case:
- I retrieve a set of domain objects with a reader (jdbc).
- Each object is passed to a processor which uses a key of the previously retrieved domain object and retrieves a set of other objects.
- I have a composite composed of the first retrieved object and the set of objects retrieved in the previous step.
- I want to write the first object and one item of the set in a file.
- Next line repeats the first object and the second item of the set.
- Continues writing the first item with the next item in the set until the set is processed.
I looked at the aggregators and thougt of overriding write in the FlatFileItemReader but since getOutputState is not accessible I did not look any further on overriding.
Extractor would not work because I am only able to pass back one line.
So the general question I think is how can I control writing of a composite?
Any ideas greatly appreciated.


Reply With Quote

