Interface CourseRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Course,Integer>, org.springframework.data.repository.Repository<Course,Integer>

@Repository public interface CourseRepository extends org.springframework.data.repository.CrudRepository<Course,Integer>
  • Method Summary

    Modifier and Type
    Method
    Description
     
     

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
  • Method Details

    • findById

      Optional<Course> findById(Long id)
    • findCoursesStaffedByUser

      @Query("select c from courses c where c.id in (select cs.courseId from staff cs where cs.githubId = :githubId)") Iterable<Course> findCoursesStaffedByUser(Integer githubId)