Interface UsersRepository

  • All Superinterfaces:
    org.springframework.data.repository.CrudRepository<Users,​java.util.UUID>, org.springframework.data.jpa.repository.JpaRepository<Users,​java.util.UUID>, org.springframework.data.repository.PagingAndSortingRepository<Users,​java.util.UUID>, org.springframework.data.repository.query.QueryByExampleExecutor<Users>, org.springframework.data.repository.Repository<Users,​java.util.UUID>

    @Repository
    public interface UsersRepository
    extends org.springframework.data.jpa.repository.JpaRepository<Users,​java.util.UUID>
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean existsByEmail​(java.lang.String email)
      Checks if an Users object exists with the given email
      boolean existsByUsername​(java.lang.String username)
      Checks if an Users object exists with the given user name
      java.util.Optional<Users> findByEmail​(java.lang.String email)
      Find Users object from the given users email
      java.util.Optional<Users> findByUsername​(java.lang.String username)
      Find Users object from the given user 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 Detail

      • existsByUsername

        boolean existsByUsername​(java.lang.String username)
        Checks if an Users object exists with the given user name
        Parameters:
        username - the user name
        Returns:
        true if a Users object exists with the given user name
      • existsByEmail

        boolean existsByEmail​(java.lang.String email)
        Checks if an Users object exists with the given email
        Parameters:
        email - the email
        Returns:
        true if a Users object exists with the given email
      • findByUsername

        java.util.Optional<Users> findByUsername​(java.lang.String username)
        Find Users object from the given user name.
        Parameters:
        username - the user name
        Returns:
        the found Users object
      • findByEmail

        java.util.Optional<Users> findByEmail​(java.lang.String email)
        Find Users object from the given users email
        Parameters:
        email - the users email
        Returns:
        the found Users object