Package it.univr.passportease.repository
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>
Repository for the
User entity.-
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteByFiscalCode(String fiscalCode) Deletes a user by its id.booleanexistsById(@NotNull UUID id) Checks if a user with the given fiscal code exists.findByFiscalCode(String fiscalCode) Finds a user by its fiscal code.Finds a user by its id.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, 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
-
findByFiscalCode
Finds a user by its fiscal code.- Parameters:
fiscalCode- the fiscal code of the user- Returns:
- the user with the given fiscal code, as an
Optional
-
findById
Finds a user by its id. -
deleteByFiscalCode
Deletes a user by its id.- Parameters:
fiscalCode- the fiscal code of the user
-
existsById
Checks if a user with the given fiscal code exists.
-