Interface UserRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<User,
,Long> org.springframework.data.repository.Repository<User,
Long>
@Repository
public interface UserRepository
extends org.springframework.data.repository.CrudRepository<User,Long>
The UserRepository is a repository for User entities.
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page
<User> findAll
(org.springframework.data.domain.Pageable pageable) findByEmail
(String email) This method returns a User entity with a given email.findByGithubId
(int githubId) findByGithubLogin
(String githubLogin) findByGoogleSub
(String googleSub) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
-
Method Details
-
findByEmail
This method returns a User entity with a given email.- Parameters:
email
- email address of the user- Returns:
- Optional of User (empty if not found)
-
findAll
org.springframework.data.domain.Page<User> findAll(org.springframework.data.domain.Pageable pageable) -
findByGoogleSub
-
findByGithubLogin
-
findByGithubId
-