Package com.alpaca.repository
Interface UserRepo
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<User,,UUID> GenericRepo<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 interface for managing
User entities.
Extends GenericRepo to inherit common CRUD operations and defines additional queries
for user-specific operations.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanexistsByEmail(String email) Checks whether a user with the specified email address exists.findByEmail(String email) Retrieves a user by their email address.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface com.alpaca.repository.GenericRepo
countByIdsMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, findAll, findAll, flush, 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
Retrieves a user by their email address.- Parameters:
email- The email address of the user - must not be null.- Returns:
- An
Optionalcontaining the user if found, otherwise empty.
-
existsByEmail
Checks whether a user with the specified email address exists.- Parameters:
email- The email address to check - must not be null.- Returns:
trueif a user with the given email exists,falseotherwise.
-