I have a requirement to split my input file which contains records of different length and type some beans. I am able to map each record to different bean using CompositeItemReader. But there is some parent-child relation exists between these records. I want to form a bean which contains child beans. Any help is appreciated.
This is my sample input file.
AB,01,05,HHGFG,05 CD,452,63,FDD,07,54,76,EQWED PT,GGG,76,YYY CD,08,06,ASW,97,55,66,BT AB,96,87,KKK,03 PT,TIPWQ,19,YEQ PT,ROPRG,39,PRVM
CD,08,06,ASW,97,55,66,BT
Here AB is considered as parent record. My segments start with AB*, CD*, PT*