bp.setName(dto.getName());
}
@Override
public PageBusinessPartnerDTO findAllBusinessPartners(Integer currentPage) throws Exception {
PageBusinessPartnerDTO page = new PageBusinessPartnerDTO();
List<BusinessPartner> allBP = bpDAO.findEntries(currentPage * PAGE_SIZE, PAGE_SIZE);
List<BusinessPartnerDTO> allDTO = new ArrayList<BusinessPartnerDTO>();
for (BusinessPartner bp : allBP) {
allDTO.add(new BusinessPartnerDTO(bp, DTOPath.NOTHING_TO_SAY));
}
page.setBusinessPartners(allDTO);
page.setCurrentPage(currentPage);
page.setPageSize(PAGE_SIZE);
page.setRowsCount(bpDAO.count().intValue());
return page;
}