alert.setEndTime(dto.getEndTime());
}
@Override
public PageAlertDTO findAllAlerts(int currentPage) throws Exception {
PageAlertDTO page = new PageAlertDTO();
List<Alert> allAlert = alertDAO.findEntries(currentPage * PAGE_SIZE, PAGE_SIZE);
List<AlertDTO> allDTO = new ArrayList<AlertDTO>();
for (Alert alert : allAlert) {
allDTO.add(new AlertDTO(alert, DTOPath.NOTHING_TO_SAY));
}
page.setAlerts(allDTO);
page.setCurrentPage(currentPage);
page.setPageSize(PAGE_SIZE);
page.setRowsCount(alertDAO.count().intValue());
return page;
}