-
May 8th, 2009, 10:28 AM
#1
creating a flatfile from domain model
Hello,
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:
HEADCOLUMN1,HEADCOLUMN2,HEADCOLUMN3
HEADVALUE1,HEADVALUE2,HEADVALUE2
DATACOLUMN1,DATACOLUMN2,DATACOLUMN3,DATACOLUMN4
DATA1,DATA2,DATA3,DATA4
DATAA1,DATAA2,DATAA3,DATAA4
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.
Bye!
-
May 8th, 2009, 10:39 AM
#2
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules