Interface ModeratorRepository

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

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

    Modifier and Type
    Method
    Description
    long
     
    boolean
     
     
    This method returns an 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 an Moderator entity with a given email.
      Parameters:
      email - email address of the moderator
      Returns:
      Optional of Moderator (empty if not found)
    • findAllByEmail

      List<Moderator> findAllByEmail(String email)
    • deleteByEmail

      @Transactional long deleteByEmail(String email)
    • existsByEmail

      boolean existsByEmail(String email)