May 8th, 2009, 10:28 AM
creating a flatfile from domain model
I have got a complex domain model. I want to construct a CSV file from this domain model. I realized, that I can use ItemReaderAdapter to access this domain model.
My CVS file is more complicated than usual. Here is an example:
and so on.
The Head contains a headline, followed by one record.
The Data contains a headline, followed by several records.
How can I archive to write the headlines to the FlatFile before I write the domain data.
The Data in the Head is calculated from the Data.
I hope I expressed it clear enough.
May 8th, 2009, 10:39 AM
Does the file contain just one Head? If so, you can write all of your Data to a file, calculating the Head information as you go. Then in a next step, you can write a Head file and concatenate the two files together.