Orederid Offerid offername OfferTotal productId productName productTerm ProductDesc
1 1 Biz1 10 11 landline 1 landline
1 1 Biz1 10 22 wireless 3 wireless
1 1 Biz1 10 33 cellphone 4 cellphone
1 2 Biz2 15 44 TV 3 TV
1 2 Biz2 15 77 Cable connection 2 Cable connection
1 2 Biz2 15 22 wireless 1 wireless
1 3 Biz3 22 11 landline 3 landline
1 3 Biz3 20 33 cellphone 4 cellphone
I am getting data from database like this from one table.
Using
java I want to group it based on offer ids and when I pass each offerId, I need to get lists of products[product details]
Offerid offername OfferTotal productId productName productTerm ProductDesc
1 Biz1 10 11 landline 1 landline
22 wireless 3 wireless
33 cellphone 4 cellphone
Offerid offername OfferTotal productId productName productTerm ProductDesc
2 Biz2 15 44 TV 3 TV
77 Cable connection 2 Cable connection
22 wireless 1 wireless
What would be the best design to have to have list of products in a list of offer.
offerList1[productList1,2...]
offerList2[productList1,2...]