source: src/main/java/it/finki/charitable/repository/DonationPostRepository.java

Last change on this file was ee0e297, checked in by KostaFortumanov <kfortumanov@…>, 3 years ago

bug fix

  • Property mode set to 100644
File size: 786 bytes
Line 
1package it.finki.charitable.repository;
2
3import it.finki.charitable.entities.AppUser;
4import it.finki.charitable.entities.DonationPost;
5import it.finki.charitable.entities.Moderator;
6import org.springframework.data.domain.Page;
7import org.springframework.data.domain.Pageable;
8import org.springframework.data.jpa.repository.JpaRepository;
9import org.springframework.stereotype.Repository;
10
11import java.util.List;
12
13@Repository
14public interface DonationPostRepository extends JpaRepository<DonationPost, Long> {
15 List<DonationPost> findAllByUser(AppUser user);
16 List<DonationPost> findAllByApproved(Boolean approved);
17 Page<DonationPost> findAllByModerator(Pageable pageable, Moderator moderator);
18 Page<DonationPost> findAllByApproved(Pageable pageable, boolean approved);
19}
Note: See TracBrowser for help on using the repository browser.