Interface UserRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<User,Long>, org.springframework.data.jpa.repository.JpaRepository<User,Long>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<User>, 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>

@Repository public interface UserRepository extends org.springframework.data.jpa.repository.JpaRepository<User,Long>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<User>
Data-access layer for User entities.
Version:
3.0.5
Author:
Stephen Prizio
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor

    org.springframework.data.jpa.repository.JpaSpecificationExecutor.SpecificationFluentQuery<T>
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deletes a User by their email.
    Attempts to look up a User by their email for authentication purposes.
    Attempts to look up a User by their email.
    Attempts to look up a User by their 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.jpa.repository.JpaSpecificationExecutor

    count, count, delete, delete, exists, exists, findAll, findAll, findAll, findAll, findAll, findBy, findBy, findOne, findOne, update

    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

    • findUserByUsername

      User findUserByUsername(String username)
      Attempts to look up a User by their username.
      Parameters:
      username - username
      Returns:
      User, can return null
    • findUserByEmail

      User findUserByEmail(String email)
      Attempts to look up a User by their email.
      Parameters:
      email - email
      Returns:
      User, can return null
    • findAuthUserByEmail

      @EntityGraph(attributePaths="roles") User findAuthUserByEmail(String email)
      Attempts to look up a User by their email for authentication purposes.
      Parameters:
      email - email
      Returns:
      User, can return null
    • deleteUserByEmail

      void deleteUserByEmail(String email)
      Deletes a User by their email.
      Parameters:
      email - email