Interface PresentsRepository

  • All Superinterfaces:
    org.springframework.data.repository.CrudRepository<Present,​Long>, org.springframework.data.jpa.repository.JpaRepository<Present,​Long>, org.springframework.data.repository.PagingAndSortingRepository<Present,​Long>, org.springframework.data.repository.query.QueryByExampleExecutor<Present>, org.springframework.data.repository.Repository<Present,​Long>

    public interface PresentsRepository
    extends org.springframework.data.jpa.repository.JpaRepository<Present,​Long>
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      List<Present> getMyClaims​(String userName)  
      List<Present> getMyRequests​(String userName)  
      List<Present> getRequestsExceptMine​(String userName)  
      • Methods inherited from interface org.springframework.data.repository.CrudRepository

        count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
      • Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

        deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlush, saveAndFlush
      • Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

        findAll
      • Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

        count, exists, findAll, findBy, findOne
    • Method Detail

      • getMyRequests

        @Query("SELECT p FROM Present p where p.name = :userName")
        List<Present> getMyRequests​(String userName)
      • getRequestsExceptMine

        @Query("SELECT p FROM Present p where p.name != :userName")
        List<Present> getRequestsExceptMine​(String userName)
      • getMyClaims

        @Query("SELECT p FROM Present p where p.claimedBy = :userName")
        List<Present> getMyClaims​(String userName)