Interface ResetPasswordsRepository

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

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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Optional<ResetPasswords> findByUser​(Users user)
      Finds the ResetPasswords object from the given Users object
      java.util.Optional<ResetPasswords> findByUserAndGeneratedPassword​(Users user, java.lang.String generatedPassword)
      Find the entry from the given Users and the given generated password(hashed)
      • 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

      • findByUser

        @Transactional
        @Query("select rp from ResetPasswords rp where rp.user=:user")
        java.util.Optional<ResetPasswords> findByUser​(@Param("user")
                                                      Users user)
        Finds the ResetPasswords object from the given Users object
        Parameters:
        user - the user
        Returns:
        an optional with the entry if found
      • findByUserAndGeneratedPassword

        @Transactional
        @Query("select rp from ResetPasswords rp where rp.user=:user and rp.generatedPassword=:generatedPassword")
        java.util.Optional<ResetPasswords> findByUserAndGeneratedPassword​(@Param("user")
                                                                          Users user,
                                                                          @Param("generatedPassword")
                                                                          java.lang.String generatedPassword)
        Find the entry from the given Users and the given generated password(hashed)
        Parameters:
        user - the user
        generatedPassword - the generated password(hashed) is the confirmationCode from the url query string
        Returns:
        an optional with the entry if found