Interface ModeratorRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Moderator,String>, org.springframework.data.repository.Repository<Moderator,String>

@Repository public interface ModeratorRepository extends org.springframework.data.repository.CrudRepository<Moderator,String>
The ModeratorRepository is a repository for Moderator entities.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    This method returns a Moderator 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

      Optional<Moderator> findByEmail(String email)
      This method returns a Moderator entity with a given email.
      Parameters:
      email - email address of the moderator
      Returns:
      Optional of Moderator (empty if not found)
    • existsByEmail

      boolean existsByEmail(String email)