I have an array of objects within an object and I would want to write each of these objects in a new line. How would I do it.
My BO structure
- array of cars
- array of trucks
I would want a line break between each car object and same with the array of trucks.
I am using a CSV delimiter and as of now the entire content is written in one line.
Thanks in advance.
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
3 replies Latest Post - 2012-03-27T03:56:56Z by Srikanth_KM
Pinned topic WebSphere outbound file adapter - Array of objects - Line breaks
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-03-27T03:56:56Z at 2012-03-27T03:56:56Z by Srikanth_KM
Uma k Korukonda 110000MBRB1 Post
vivd 270001CTTP2 PostsACCEPTED ANSWER
Re: WebSphere outbound file adapter - Array of objects - Line breaks2012-03-23T03:09:38Z in response to Uma k KorukondaThanks Uma. Could you please give me an example. As far as I understand the file adapter serializes the complete object (along with the child objects) into CSV (incase of CSV delimiter) into one single line. Just wondering if I need to you write a wrapper class for the splitFunction.
Along the same lines, wanted to know how could I make one of the child objects NOT to be written out to the file by the file adapter if the object is null.
Srikanth_KM 270000NMR43 PostsACCEPTED ANSWER
Re: WebSphere outbound file adapter - Array of objects - Line breaks2012-03-27T03:56:56Z in response to vivdHi,
If you would need a line break for each of the car object and truck objects, (within a BO) , then you would need to use the new line as the delimiter with the Delimited data handler instead of the CSV datahandler.