Interface NotificaRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Notifica,,Long> org.springframework.data.jpa.repository.JpaRepository<Notifica,,Long> org.springframework.data.repository.ListCrudRepository<Notifica,,Long> org.springframework.data.repository.ListPagingAndSortingRepository<Notifica,,Long> org.springframework.data.repository.PagingAndSortingRepository<Notifica,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<Notifica>,org.springframework.data.repository.Repository<Notifica,Long>
-
Method Summary
Modifier and TypeMethodDescriptionbooleanexistsByAutoreAndTestoAndExpireDateAfter(String autore, String testo, LocalDateTime localDateTime) Query per controllare se esiste una notifica con autore e testo specificati con la data di scadenza passata.booleanexistsByIdNotifica(long idNotifica) Query per controllare se esiste una notifica tramite l'id.findByAutore(String autore) Query per trovare la lista notifiche inviate da un autore.findByIdNotifica(Long idNotifica) Query per trovare una Notifica usando il suo id.findFirstByAutoreAndTestoOrderByDataInvioDesc(String autore, String testo) Query per trovare la notifica più recente tramite autore e testo (usato per i test).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
-
findByIdNotifica
Query per trovare una Notifica usando il suo id.- Parameters:
idNotifica- Id della Notifica- Returns:
- Notifica
-
findByAutore
Query per trovare la lista notifiche inviate da un autore.- Parameters:
autore- Autore della notifica- Returns:
- Lista di notifiche
-
existsByIdNotifica
boolean existsByIdNotifica(long idNotifica) Query per controllare se esiste una notifica tramite l'id.- Parameters:
idNotifica- Id della notifica- Returns:
- boolean
-
findFirstByAutoreAndTestoOrderByDataInvioDesc
Query per trovare la notifica più recente tramite autore e testo (usato per i test).- Parameters:
autore- Autore della notificatesto- Testo della notifica- Returns:
- Notifica
-
existsByAutoreAndTestoAndExpireDateAfter
boolean existsByAutoreAndTestoAndExpireDateAfter(String autore, String testo, LocalDateTime localDateTime) Query per controllare se esiste una notifica con autore e testo specificati con la data di scadenza passata.- Parameters:
autore- Autore della notificatesto- Testo della notificalocalDateTime- Data oltre cui non bisogna andare- Returns:
- boolean
-