@Override public CheckingAccount build(GenericFactory<CheckingAccount> factory) { if (model == null) model = new CheckingAccount(); model.setBankUnit(getBankUnit().build(null)); model.setName(name); model.setNumber(number); model.setOpening(opening); model.setStart(start); model.setStartBalance(startBalance); model.setDigit(getDigit()); model.setActive(isActive()); Set<CollectionAccount> collAcclist = new HashSet<CollectionAccount>(); for (CollectionAccountBean coll : getCollectionAccounts()) { collAcclist.add(coll.build(null)); } model.setCollectionAccounts(collAcclist); return model; }