}
private static OrderListExpandedDTO performSearch(Integer pageNumber, Integer pageSize, OrderSearchDto searchDto) throws DataAccessException {
List<Order> orders = DaoManager.getOrderDao().search(pageNumber - 1, pageSize, searchDto);
if (orders == null) {
throw new DataAccessException();
}
Integer totalOrders = DaoManager.getOrderDao().searchResultsCount(searchDto);
Integer totalPages = Double.valueOf(Math.ceil((double) totalOrders / pageSize)).intValue();
OrderListExpandedDTO ordersDto = OrderListExpandedDTO.createFrom(orders, totalPages);
return ordersDto;