Interface UserRepository
-
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<User,Long>,org.springframework.data.jpa.repository.JpaRepository<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>
Spring Data JPA repository for theUserentity.
-
-
Field Summary
Fields Modifier and Type Field Description static StringUSERS_BY_EMAIL_CACHEstatic StringUSERS_BY_LOGIN_CACHE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<User>findAllByActivatedIsFalseAndActivationKeyIsNotNullAndCreatedDateBefore(Instant dateTime)org.springframework.data.domain.Page<User>findAllByLoginNot(org.springframework.data.domain.Pageable pageable, String login)Optional<User>findOneByActivationKey(String activationKey)Optional<User>findOneByEmailIgnoreCase(String email)Optional<User>findOneByLogin(String login)Optional<User>findOneByResetKey(String resetKey)Optional<User>findOneWithAuthoritiesByEmailIgnoreCase(String email)Optional<User>findOneWithAuthoritiesById(Long id)Optional<User>findOneWithAuthoritiesByLogin(String login)-
Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteById, existsById, findById, save
-
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getOne, saveAll, saveAndFlush
-
-
-
-
Field Detail
-
USERS_BY_LOGIN_CACHE
static final String USERS_BY_LOGIN_CACHE
- See Also:
- Constant Field Values
-
USERS_BY_EMAIL_CACHE
static final String USERS_BY_EMAIL_CACHE
- See Also:
- Constant Field Values
-
-
Method Detail
-
findAllByActivatedIsFalseAndActivationKeyIsNotNullAndCreatedDateBefore
List<User> findAllByActivatedIsFalseAndActivationKeyIsNotNullAndCreatedDateBefore(Instant dateTime)
-
findOneWithAuthoritiesById
@EntityGraph(attributePaths="authorities") Optional<User> findOneWithAuthoritiesById(Long id)
-
findOneWithAuthoritiesByLogin
@Cacheable(cacheNames="usersByLogin") @EntityGraph(attributePaths="authorities") Optional<User> findOneWithAuthoritiesByLogin(String login)
-
findOneWithAuthoritiesByEmailIgnoreCase
@Cacheable(cacheNames="usersByEmail") @EntityGraph(attributePaths="authorities") Optional<User> findOneWithAuthoritiesByEmailIgnoreCase(String email)
-
-