Interface CourseRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Course,​java.lang.Long>, org.springframework.data.jpa.repository.JpaRepository<Course,​java.lang.Long>, org.springframework.data.repository.PagingAndSortingRepository<Course,​java.lang.Long>, org.springframework.data.repository.query.QueryByExampleExecutor<Course>, org.springframework.data.repository.Repository<Course,​java.lang.Long>

@Repository
public interface CourseRepository
extends org.springframework.data.jpa.repository.JpaRepository<Course,​java.lang.Long>
CourseRepository.findByName: Return list of: SELECT * FROM Course WHERE name = i . Where i, ?1 are equale to variables.
  • Method Summary

    Modifier and Type Method Description
    java.util.Optional<Course> findByName​(java.lang.String name)  

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

    count, delete, deleteAll, deleteAll, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getOne, saveAll, saveAndFlush

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

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findOne
  • Method Details

    • findByName

      @Query("FROM Course WHERE name = ?1") java.util.Optional<Course> findByName​(@Param("name") java.lang.String name)