am facing issue on how to store and then retrieve data . In my program which is simple java class i am retrieving data at 3 places from an xml. i need to store this temporarly in particular fashion as data is related and needed to be used later on at end program to generate report.
first data i am retireving is employee names eg Tom , Reggie, Martha. Second data is department (Each employee belongs to 1 or many department ) so in this case
Tom : Billing Reggie : Admin , HR Martha : IT
Third data is Department number (This has 1 : 1 relationship with Department ) Billing :01 Admin :02 HR:03 IT:04
So when i am parsing xml first i am getting employee data, then department and lastly department number. I need to store it in collection in such way later on i can retireve and link data and use it.....
I suppose the third data of Department number is fixed so you can use class scope hashtable which will be populated only once, for the other data you can create a bean ( inner class or outer if your project permits)