Announcement Announcement Module
Collapse
No announcement yet.
creating a flatfile from domain model Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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!

  • #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.

    Comment

    Working...
    X