Interface RecommendationRequestRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<RecommendationRequest,Long>, org.springframework.data.repository.Repository<RecommendationRequest,Long>

@Repository public interface RecommendationRequestRepository extends org.springframework.data.repository.CrudRepository<RecommendationRequest,Long>
The RecommendationRequestRepository is a repository for RecommendationRequest entities.
  • Method Details

    • findByIdAndRequester

      Optional<RecommendationRequest> findByIdAndRequester(long id, User requester_id)
    • findAllByRequesterId

      Iterable<RecommendationRequest> findAllByRequesterId(Long requester_id)
      This method returns an iterable of recommendation requests with given requester_id.
      Parameters:
      requester_id - requester_id within RecommendationRequest that maps to id in User table
      Returns:
      iterable of RecommendationRequests with requester_id == requester_id
    • findAllByProfessorId

      Iterable<RecommendationRequest> findAllByProfessorId(Long professor_id)
      This method returns an iterable of recommendation requests with given professor_id.
      Parameters:
      professor_id - professor_id within RecommendationRequest that maps to id in User table
      Returns:
      iterable of RecommendationRequests with professor_id == professor_id
    • findAllByProfessorIdAndStatus

      Iterable<RecommendationRequest> findAllByProfessorIdAndStatus(Long professor_id, String status)
      Find all recommendation requests by professor ID and status.
      Parameters:
      professor_id - professor_id within RecommendationRequest that maps to id in User table
      status - the status of recommendation request
      Returns:
      a list of recommendation requests matching the criteria