I am developing a project as Task Tracking System.One of the entities used in my project are Client and Task.So i build the form bean for Client and Task. The Client form Bean consists:Client Id,ClientName.The Task form bean consists of TaskId,TaskName,Description,CreateDate,Status etc.The Relation between client and task is of one to many relation.Now i want to show the list of task with their client.For this i am taking an arraylist and from the database i am picking the resultset containing taskid,taskname,createdate,clientid,clientname.Now the problem is that how should i set the bean value and store that in ArrayList so that i can print all the information.How should i create the relation.The relation is one to many.should i build another bean which extend task and add some repeated attributes like clientid, clientname etc(from client).Please give me suggestion on my problem(what should i do).
Please give me the suggestion of how to solve the above problem.I will be very grateful to you.
In your Client form bean have an ArrayList for holding Task form bean instances. Once you get the resultset from the DB, create an ArrayList of the Client form bean where each form bean will contain a list of the associated tasks and also the particular Client's details.
Joined: Mar 28, 2007
Thanks for your reply but i didn't get you.Can you explain it in more detail. If possible,also give me some code related to my problem.Thanks in advance