Interface UserRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<User,
,Long> org.springframework.data.jpa.repository.JpaRepository<User,
,Long> org.springframework.data.repository.ListCrudRepository<User,
,Long> org.springframework.data.repository.ListPagingAndSortingRepository<User,
,Long> org.springframework.data.repository.PagingAndSortingRepository<User,
,Long> org.springframework.data.repository.query.QueryByExampleExecutor<User>
,org.springframework.data.repository.Repository<User,
Long>
public interface UserRepository
extends org.springframework.data.jpa.repository.JpaRepository<User,Long>
Repository interface for communicating with the data layer related to the user entity
- Since:
- 17.4.24
- Version:
- 1.0
- Author:
- Harry L.X and Lars M.L.N
-
Method Summary
Modifier and TypeMethodDescriptionfindByEmail
(String email) Finds a user from a given emailfindByHandle
(com.yubico.webauthn.data.ByteArray handle) Finds a user based on their handle, which acts as a unique identifier for the userfindByUsername
(String username) Finds a user from a given usernameMethods 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
-
findByUsername
Finds a user from a given username- Parameters:
username
- Username- Returns:
- Optional user
-
findByEmail
Finds a user from a given email- Parameters:
email
- Email- Returns:
- Optional email
-
findByHandle
Finds a user based on their handle, which acts as a unique identifier for the user- Parameters:
handle
- Unique identifier of the user, used for biometric registration/login- Returns:
- User with the matching handle
-