Interface UserProfileRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<UserProfile,,Long> org.springframework.data.jpa.repository.JpaRepository<UserProfile,,Long> org.springframework.data.repository.ListCrudRepository<UserProfile,,Long> org.springframework.data.repository.ListPagingAndSortingRepository<UserProfile,,Long> org.springframework.data.repository.PagingAndSortingRepository<UserProfile,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<UserProfile>,org.springframework.data.repository.Repository<UserProfile,Long>
public interface UserProfileRepository
extends org.springframework.data.jpa.repository.JpaRepository<UserProfile,Long>
Repository per la gestione dei profili utente estesi.
Questa interfaccia gestisce l'entita' UserProfile, che contiene informazioni
aggiuntive
rispetto all'account base (Utente). E' fondamentale per collegare i dati di
login
ai ruoli specifici della filiera (es. Produttore, Distributore) e ai dati
anagrafici completi.
-
Method Summary
Modifier and TypeMethodDescriptionfindByUtenteId(Long utenteId) Cerca il profilo dettagliato associato a un determinato ID utente.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, 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
-
findByUtenteId
Cerca il profilo dettagliato associato a un determinato ID utente. Questo metodo permette di recuperare le informazioni estese (es. nome, cognome, indirizzo) partendo dall'identificativo dell'account di login. E' utilizzato spesso dai servizi di gestione per verificare lo stato di completamento del profilo o per visualizzare i dati nella dashboard personale.- Parameters:
utenteId- L'ID univoco dell'utente (account) di cui si cerca il profilo.- Returns:
- Un Optional contenente il UserProfile se l'associazione esiste, altrimenti vuoto.
-