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 Type
    Method
    Description
    Finds a user email auth token by user and auth token.
    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, 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

    • findByUserAndAuthToken

      Optional<UserEmailAuthToken> findByUserAndAuthToken(User user, String authToken)
      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

      List<UserEmailAuthToken> findByUserAndCreatedAtGreaterThan(User user, Instant createdAt)
      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.