Package edu.ucsb.cs156.rec.repositories
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 Summary
Modifier and TypeMethodDescriptionfindAllByProfessorId
(Long professor_id) This method returns an iterable of recommendation requests with given professor_id.findAllByProfessorIdAndStatus
(Long professor_id, String status) Find all recommendation requests by professor ID and status.findAllByRequesterId
(Long requester_id) This method returns an iterable of recommendation requests with given requester_id.findByIdAndRequester
(long id, User requester_id) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
-
Method Details
-
findByIdAndRequester
-
findAllByRequesterId
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
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
Find all recommendation requests by professor ID and status.- Parameters:
professor_id
- professor_id within RecommendationRequest that maps to id in User tablestatus
- the status of recommendation request- Returns:
- a list of recommendation requests matching the criteria
-