Reputation: 33
i have a list of java bean, bean name is "bean_A" and at run-time, record entry in list is like
beanA properties are
class beanA
{
public String employename;
public String employeBranch;
public String designation;
public Date absentDate;
}
i want to transform it into another bean list with name bean_B so the employee related information will not repeat in list
properties of bean_B
class bean_B
{
public String employename;
public String employeBranch;
public String designation;
public List<Date> absentDates;
}
so that record entry will be like bean_B record entry after transforming list bean_A will be like
Upvotes: 0
Views: 76
Reputation: 810
Use a Map with name+branch+designation as key and List of dates as Values, Iterate on keys and fill up the table.
Upvotes: 2