Interface ProdottoRepository

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

public interface ProdottoRepository extends org.springframework.data.jpa.repository.JpaRepository<Prodotto,Long>
Repository per la gestione del catalogo prodotti. Questa interfaccia gestisce la persistenza delle definizioni dei prodotti (es. "Mela Golden", "Formaggio Pecorino"). I prodotti rappresentano le tipologie di beni che gli attori della filiera possono produrre o trasformare, fungendo da "template" per la creazione dei lotti specifici.
  • Method Summary

    Modifier and Type
    Method
    Description
    findByUtenteId(Long utenteId)
    Recupera la lista di tutti i prodotti definiti da un determinato utente.

    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

    • findByUtenteId

      List<Prodotto> findByUtenteId(Long utenteId)
      Recupera la lista di tutti i prodotti definiti da un determinato utente. Questo metodo e' essenziale per la dashboard del produttore o trasformatore, permettendo loro di visualizzare e gestire il proprio catalogo personale di prodotti.
      Parameters:
      utenteId - L'ID dell'utente proprietario dei prodotti.
      Returns:
      Una lista di oggetti Prodotto creati dall'utente specificato.