Package org.localify.repositories
Interface UserEmailAuthTokenRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<UserEmailAuthToken,,UUID> org.springframework.data.jpa.repository.JpaRepository<UserEmailAuthToken,,UUID> org.springframework.data.repository.ListCrudRepository<UserEmailAuthToken,,UUID> org.springframework.data.repository.ListPagingAndSortingRepository<UserEmailAuthToken,,UUID> org.springframework.data.repository.PagingAndSortingRepository<UserEmailAuthToken,,UUID> org.springframework.data.repository.query.QueryByExampleExecutor<UserEmailAuthToken>,org.springframework.data.repository.Repository<UserEmailAuthToken,UUID>
public interface UserEmailAuthTokenRepository
extends org.springframework.data.jpa.repository.JpaRepository<UserEmailAuthToken,UUID>
Repository for
UserEmailAuthToken entities.-
Method Summary
Modifier and TypeMethodDescriptionfindByUserAndAuthToken(User user, String authToken) Finds a user email auth token by user and auth token.findByUserAndCreatedAtGreaterThan(User user, Instant createdAt) Finds all user email auth tokens for a user created after a certain time.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findByUserAndAuthToken
Finds a user email auth token by user and auth token.- Parameters:
user- The user.authToken- The auth token.- Returns:
- An optional containing the user email auth token if found, otherwise empty.
-
findByUserAndCreatedAtGreaterThan
Finds all user email auth tokens for a user created after a certain time.- Parameters:
user- The user.createdAt- The timestamp to check against.- Returns:
- A list of user email auth tokens.
-