Interface PreferitiRepository

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

@Repository public interface PreferitiRepository extends org.springframework.data.jpa.repository.JpaRepository<Preferiti,PreferitiKey>
  • Method Summary

    Modifier and Type
    Method
    Description
    Query per recuperare il luogo preferito tramite il suo id.
    findByIdUtente(Long idUtente)
    Query custom per recuperare la lista dei luoghi preferiti di un determinato utente tramite l'id.

    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

    • findByIdUtente

      @Query("SELECT p FROM Preferiti p WHERE p.idPreferiti.idUtente=?1") List<Preferiti> findByIdUtente(Long idUtente)
      Query custom per recuperare la lista dei luoghi preferiti di un determinato utente tramite l'id.
      Parameters:
      idUtente - Id dell' Utente
      Returns:
      Lista di notifiche ricevute di quell' Utente
    • findByIdPreferiti

      Preferiti findByIdPreferiti(PreferitiKey preferitiKey)
      Query per recuperare il luogo preferito tramite il suo id.
      Parameters:
      preferitiKey - id luogo preferito
      Returns:
      Luogo preferito con l'id indicato