Interface CitizenRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Citizen,UUID>, org.springframework.data.jpa.repository.JpaRepository<Citizen,UUID>, org.springframework.data.repository.ListCrudRepository<Citizen,UUID>, org.springframework.data.repository.ListPagingAndSortingRepository<Citizen,UUID>, org.springframework.data.repository.PagingAndSortingRepository<Citizen,UUID>, org.springframework.data.repository.query.QueryByExampleExecutor<Citizen>, org.springframework.data.repository.Repository<Citizen,UUID>

@Repository public interface CitizenRepository extends org.springframework.data.jpa.repository.JpaRepository<Citizen,UUID>
Repository for Citizen entity.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Delete the citizen with the given fiscal code.
    Find the citizen with the given fiscal code.

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

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, 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

    • deleteByFiscalCode

      void deleteByFiscalCode(String fiscalCode)
      Delete the citizen with the given fiscal code.
      Parameters:
      fiscalCode - the fiscal code of the citizen to delete
    • findByFiscalCode

      Optional<Citizen> findByFiscalCode(String fiscalCode)
      Find the citizen with the given fiscal code.
      Parameters:
      fiscalCode - the fiscal code of the citizen to find
      Returns:
      an Optional containing the citizen with the given fiscal code