Skip to content

Commit

Permalink
Merge branch 'master' into DMP-4710
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-Edwards-cgi authored Feb 6, 2025
2 parents f6aba71 + 988df3b commit 04cc432
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -361,12 +361,14 @@ void findAllWithIdMatchingOneOf_shouldReturn() {
CourtCaseEntity case1 = dartsDatabase.createCase(SOME_COURTHOUSE, SOME_CASE_NUMBER_1);
dartsDatabase.createCase(SOME_COURTHOUSE, SOME_CASE_NUMBER_2);
CourtCaseEntity case3 = dartsDatabase.createCase(SOME_COURTHOUSE, "SOME_CASE_NUMBER_3");
CourtCaseEntity case4 = dartsDatabase.createCase(SOME_COURTHOUSE, "SOME_CASE_NUMBER_0");

List<CourtCaseEntity> returnedCourtCases = caseRepository.findAllWithIdMatchingOneOf(List.of(
case1.getId(), case3.getId()
case1.getId(), case3.getId(), case4.getId()
));
assertThat(returnedCourtCases).hasSize(2);
assertThat(returnedCourtCases).hasSize(3);
assertThat(returnedCourtCases.get(0).getId()).isEqualTo(case3.getId());
assertThat(returnedCourtCases.get(1).getId()).isEqualTo(case1.getId());
assertThat(returnedCourtCases.get(1).getId()).isEqualTo(case4.getId());
assertThat(returnedCourtCases.get(2).getId()).isEqualTo(case1.getId());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ List<Integer> findCasesNeedingCaseDocumentForRetentionDateGeneration(OffsetDateT
SELECT cc
FROM CourtCaseEntity cc
WHERE cc.id in :ids
ORDER BY cc.id DESC
ORDER BY cc.caseNumber DESC
""")
List<CourtCaseEntity> findAllWithIdMatchingOneOf(List<Integer> ids);
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ ILIKE CONCAT('%', cast(:courtHouseDisplayName as text), '%'))) AND
(:requestedBy IS NULL OR (tm.createdBy.userFullName ILIKE CONCAT('%', cast (:requestedBy as text), '%'))) AND
((cast(:requestedAtFrom as TIMESTAMP)) IS NULL OR media.createdDateTime >= :requestedAtFrom) AND
((cast(:requestedAtTo as TIMESTAMP)) IS NULL OR (media.createdDateTime <= :requestedAtTo))
ORDER BY media.id DESC
ORDER BY tm.id DESC
""")
List<TransformedMediaEntity> findTransformedMedia(Integer mediaId,
String caseNumber,
Expand Down

0 comments on commit 04cc432

Please sign in to comment.