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 Type
    Method
    Description
    Finds a user from a given email
    findByHandle(com.yubico.webauthn.data.ByteArray handle)
    Finds a user based on their handle, which acts as a unique identifier for the user
    Finds a user from a given username

    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

    • findByUsername

      Optional<User> findByUsername(String username)
      Finds a user from a given username
      Parameters:
      username - Username
      Returns:
      Optional user
    • findByEmail

      Optional<User> findByEmail(String email)
      Finds a user from a given email
      Parameters:
      email - Email
      Returns:
      Optional email
    • findByHandle

      User findByHandle(com.yubico.webauthn.data.ByteArray handle)
      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