}
try {
List<User> users = DaoManager.getUserDao().getBatch(pageNumber - 1, pageSize);
Integer totalUsers = DaoManager.getUserDao().totalEntities();
Integer totalPages = Double.valueOf(Math.ceil((double) totalUsers / pageSize)).intValue();
UsersListDto usersDto = UsersListDto.createFrom(users, totalPages);
return ok(toJson(usersDto));
} catch (DataAccessException e) {
Logger.error("Failed to get a batch of users. Page: " + pageNumber + ", size: " + pageSize, e);
return notFound("Can't get page " + pageNumber + ", size: " + pageSize);
}