-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStudentCourseRepository.java
More file actions
27 lines (17 loc) · 992 Bytes
/
StudentCourseRepository.java
File metadata and controls
27 lines (17 loc) · 992 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.example.enjoy.repository;
import com.example.enjoy.dto.StudentCourseStatus;
import com.example.enjoy.entity.StudentCourse;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Optional;
@Repository
public interface StudentCourseRepository extends JpaRepository<StudentCourse, Long> {
List<StudentCourse> findByStudentId(String studentId);
boolean existsByStudentIdAndCourseName(String studentId, String courseName);
Optional<StudentCourse> findByStudentIdAndCourseNameAndManualIsTrue(String studentId, String courseName);
List<StudentCourse> findAllByStudentIdAndStatus(String studentId, StudentCourseStatus status);
Optional<StudentCourse> findByStudentIdAndCourseName(String studentId, String courseName);
List<StudentCourse> findAllByStudentIdAndManualIsTrue(String studentId);
}