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 public interface UserRepo extends GenericRepo<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 Type
    Method
    Description
    boolean
    Checks whether a user with the specified email address exists.
    Retrieves a user by their email address.

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface com.alpaca.repository.GenericRepo

    countByIds

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, findAll, findAll, flush, getReferenceById, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • Method Details

    • findByEmail

      Optional<User> findByEmail(String email)
      Retrieves a user by their email address.
      Parameters:
      email - The email address of the user - must not be null.
      Returns:
      An Optional containing the user if found, otherwise empty.
    • existsByEmail

      boolean existsByEmail(String email)
      Checks whether a user with the specified email address exists.
      Parameters:
      email - The email address to check - must not be null.
      Returns:
      true if a user with the given email exists, false otherwise.