Schnittstelle UserRepository
- Alle Superschnittstellen:
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 accessing and managing user entities in the database.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
existsByEmail
(String email) Checks whether a user with the given email already exists.boolean
existsByUserName
(String userName) Checks whether a user with the given username already exists.findByEmailOrUserName
(String email, String userName) Retrieves a user by email or username.Von Schnittstelle geerbte Methoden org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
Von Schnittstelle geerbte Methoden org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush
Von Schnittstelle geerbte Methoden org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAll
Von Schnittstelle geerbte Methoden org.springframework.data.repository.ListPagingAndSortingRepository
findAll
Von Schnittstelle geerbte Methoden org.springframework.data.repository.PagingAndSortingRepository
findAll
Von Schnittstelle geerbte Methoden org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Methodendetails
-
findByEmailOrUserName
-
existsByEmail
Checks whether a user with the given email already exists.- Parameter:
email
- the email address to check- Gibt zurück:
true
if a user with the given email exists,false
otherwise
-
existsByUserName
Checks whether a user with the given username already exists.- Parameter:
userName
- the username to check- Gibt zurück:
true
if a user with the given username exists,false
otherwise
-