Interface EnrollmentRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Enrollment,EnrollmentId>, org.springframework.data.jpa.repository.JpaRepository<Enrollment,EnrollmentId>, org.springframework.data.repository.ListCrudRepository<Enrollment,EnrollmentId>, org.springframework.data.repository.ListPagingAndSortingRepository<Enrollment,EnrollmentId>, org.springframework.data.repository.PagingAndSortingRepository<Enrollment,EnrollmentId>, org.springframework.data.repository.query.QueryByExampleExecutor<Enrollment>, org.springframework.data.repository.Repository<Enrollment,EnrollmentId>

public interface EnrollmentRepository extends org.springframework.data.jpa.repository.JpaRepository<Enrollment,EnrollmentId>
  • Method Summary

    Modifier and Type
    Method
    Description
    The roster of a course.
    A student's enrollments (their personal course list).
    The single enrollment of a student in a course, if any.

    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, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

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

    findAll, findAllById, saveAll

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

    findAll

    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 Details

    • findByUser

      List<Enrollment> findByUser(User user)
      A student's enrollments (their personal course list).
    • findByUserAndCourse

      Optional<Enrollment> findByUserAndCourse(User user, Course course)
      The single enrollment of a student in a course, if any.
    • findByCourse

      List<Enrollment> findByCourse(Course course)
      The roster of a course.