public List<ProductExt_W49> getByEnterpriser(Enterprise e) { List<ProductExt_W49> list = selectAll(); List<ProductExt_W49> lr = new ArrayList<ProductExt_W49>(); for (int i = 0; i < list.size(); i++) { Product p = productBN.getById(list.get(i).getProductIdActual()); if (p.getEnterpriseIdActual() == e.getId()) { lr.add(list.get(i)); } } return lr; }