Skip to content

Commit

Permalink
Entrega final
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarobernal2412 committed Dec 20, 2023
1 parent fee5b76 commit 3ccf723
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
import org.springframework.samples.petclinic.pet.PetType;

public interface DiseaseRepository extends CrudRepository<Disease, Integer> {
// @Query("SELECT d FROM Disease d WHERE (d.pet_type IN :petTypes) AND (d.visit.datetime >= :startDate) AND (d.visit.datetime <= :endDate) AND (d.severity >= :diagnoses)")
// Set<Disease> findEpidemicDiseases(@Param("petTypes") Set<PetType> petTypes,
// @Param("startDate") LocalDateTime startDate,
// @Param("endDate") LocalDateTime endDate,
// @Param("diagnoses")Integer diagnoses);
// @Query("SELECT d FROM Disease d JOIN Visit v WHERE :petTypes MEMBER OF d.susceptiblePetTypes AND (v.datetime >= :startDate) AND (v.datetime <= :endDate) AND (d.severity >= :diagnoses)")
@Query("SELECT d FROM Disease d")
Set<Disease> findEpidemicDiseases(@Param("petTypes") Set<PetType> petTypes,
@Param("startDate") LocalDateTime startDate,
@Param("endDate") LocalDateTime endDate,
@Param("diagnoses")Integer diagnoses);

List<Disease> findAll();
}

0 comments on commit 3ccf723

Please sign in to comment.