Interface UserRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<User,,UUID> org.springframework.data.jpa.repository.JpaRepository<User,,UUID> org.springframework.data.repository.ListCrudRepository<User,,UUID> org.springframework.data.repository.ListPagingAndSortingRepository<User,,UUID> org.springframework.data.repository.PagingAndSortingRepository<User,,UUID> org.springframework.data.repository.query.QueryByExampleExecutor<User>,org.springframework.data.repository.Repository<User,UUID>
@Repository
public interface UserRepository
extends org.springframework.data.jpa.repository.JpaRepository<User,UUID>
UserRepository.java - Repository interface for User entity.
- Author:
- Kristian Popov
-
Method Summary
Modifier and TypeMethodDescriptionlongcountByCreatedOnAfter(LocalDateTime createdOn) Count users registered after the given moment in time.findByEmail(String email) Find user by email.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
-
findByEmail
Find user by email.- Parameters:
email- - user email- Returns:
- user
-
countByCreatedOnAfter
Count users registered after the given moment in time.- Parameters:
createdOn- - exclusive lower bound for the registration timestamp- Returns:
- the number of matching users
-