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 TypeMethodDescriptionvoid
deleteByFiscalCode
(String fiscalCode) Deletes a user by its id.boolean
existsById
(@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, save
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, 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
-
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.
-