- Timestamp:
- 10/07/21 20:29:27 (3 years ago)
- Branches:
- master
- Children:
- 7888b17
- Parents:
- 0c37625
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/it/finki/charitable/services/DonationPostService.java
r0c37625 ree0e297 46 46 } 47 47 48 public List<DonationPost> findAllByModerator(Moderator moderator) { 49 return donationPostRepository.findAllByModerator(moderator); 48 public Page<DonationPost> findAllByModerator(int pageNo, int pageSize, String sort, String order, Moderator moderator) { 49 Sort s = Sort.by(sort); 50 s = order.equals("asc") ? s.ascending() : s.descending(); 51 Pageable pageable = PageRequest.of(pageNo - 1, pageSize, s); 52 return donationPostRepository.findAllByModerator(pageable, moderator); 50 53 } 51 54
Note:
See TracChangeset
for help on using the changeset viewer.