Interface InstructorRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Instructor,
,String> org.springframework.data.repository.Repository<Instructor,
String>
@Repository
public interface InstructorRepository
extends org.springframework.data.repository.CrudRepository<Instructor,String>
The InstructorRepository is a repository for Instructor entities.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
existsByEmail
(String email) findByEmail
(String email) This method returns an Instructor entity with a given email.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
-
Method Details
-
findByEmail
This method returns an Instructor entity with a given email.- Parameters:
email
- email address of the instructor- Returns:
- Optional of Instructor (empty if not found)
-
existsByEmail
-