Interface ChangePasswordRequestRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<ChangePasswordRequest,
,Long> org.springframework.data.jpa.repository.JpaRepository<ChangePasswordRequest,
,Long> org.springframework.data.repository.ListCrudRepository<ChangePasswordRequest,
,Long> org.springframework.data.repository.ListPagingAndSortingRepository<ChangePasswordRequest,
,Long> org.springframework.data.repository.PagingAndSortingRepository<ChangePasswordRequest,
,Long> org.springframework.data.repository.query.QueryByExampleExecutor<ChangePasswordRequest>
,org.springframework.data.repository.Repository<ChangePasswordRequest,
Long>
public interface ChangePasswordRequestRepository
extends org.springframework.data.jpa.repository.JpaRepository<ChangePasswordRequest,Long>
Repository interface for communicating with the data layer in relation to the ChangePasswordRequest entity.
- Since:
- 22.4.2024
- Version:
- 1.0
- Author:
- Lars N.
-
Method Summary
Modifier and TypeMethodDescriptionFinds a change password request based on its user IDfindIdByUserId
(Long userId) Finds the ID of a change password request using the object's user IDc:wMethods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush
Methods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAll
Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAll
Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAll
Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findChangePasswordRequestByUserID
Finds a change password request based on its user ID- Parameters:
userID
- Id of user that initiated the change password request- Returns:
- Optional wrapped around the object if it exists, else returns an empty Optional
-
findIdByUserId
@Query("SELECT cpr.id FROM ChangePasswordRequest cpr WHERE cpr.userID = :userId") Optional<String> findIdByUserId(Long userId) Finds the ID of a change password request using the object's user IDc:w- Parameters:
userId
- Id of user that initiated the change password request- Returns:
- Optional wrapped around the ID if it exists, else returns an empty Optional
-