From 8855c6260c06fd2edbc928ea8c20bcd2525a7f12 Mon Sep 17 00:00:00 2001 From: Jarold Wong Date: Thu, 23 May 2024 14:40:47 -0700 Subject: [PATCH] remove references to census snapshot code --- .../budget/views/factories/JpaBudgetViewFactory.java | 2 +- .../dss/ipa/services/jpa/JpaDataWarehouseService.java | 3 +-- .../dss/ipa/services/jpa/JpaWorkloadAssignmentService.java | 6 ++---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/java/edu/ucdavis/dss/ipa/api/components/budget/views/factories/JpaBudgetViewFactory.java b/src/main/java/edu/ucdavis/dss/ipa/api/components/budget/views/factories/JpaBudgetViewFactory.java index 698abfbd..539c35f4 100644 --- a/src/main/java/edu/ucdavis/dss/ipa/api/components/budget/views/factories/JpaBudgetViewFactory.java +++ b/src/main/java/edu/ucdavis/dss/ipa/api/components/budget/views/factories/JpaBudgetViewFactory.java @@ -212,7 +212,7 @@ public BudgetScenarioExcelView createBudgetScenarioExcelView(BudgetScenario budg List censusList = new ArrayList<>(); for (String budgetScenarioSubjectCode : budgetScenarioSubjectCodes) { for (String budgetScenarioTermCode : budgetScenarioTermCodes) { - censusList.addAll(dwRepository.getCensusBySubjectCodeAndTermCode(budgetScenarioSubjectCode, budgetScenarioTermCode).stream().filter(c -> "CURRENT".equals(c.getSnapshotCode())).collect(Collectors.toList())); + censusList.addAll(dwRepository.getCensusBySubjectCodeAndTermCode(budgetScenarioSubjectCode, budgetScenarioTermCode)); } } diff --git a/src/main/java/edu/ucdavis/dss/ipa/services/jpa/JpaDataWarehouseService.java b/src/main/java/edu/ucdavis/dss/ipa/services/jpa/JpaDataWarehouseService.java index b815c2e2..5ade215a 100644 --- a/src/main/java/edu/ucdavis/dss/ipa/services/jpa/JpaDataWarehouseService.java +++ b/src/main/java/edu/ucdavis/dss/ipa/services/jpa/JpaDataWarehouseService.java @@ -46,8 +46,7 @@ public Map> generateCourseCensusMap(List cours } List censusList = - courseCensusFutures.stream().map(CompletableFuture::join).flatMap(Collection::stream) - .filter(c -> "CURRENT".equals(c.getSnapshotCode())).collect(Collectors.toList()); + courseCensusFutures.stream().map(CompletableFuture::join).flatMap(Collection::stream).toList(); Map> censusMap = new HashMap<>(); diff --git a/src/main/java/edu/ucdavis/dss/ipa/services/jpa/JpaWorkloadAssignmentService.java b/src/main/java/edu/ucdavis/dss/ipa/services/jpa/JpaWorkloadAssignmentService.java index 70e6c221..4c29241c 100644 --- a/src/main/java/edu/ucdavis/dss/ipa/services/jpa/JpaWorkloadAssignmentService.java +++ b/src/main/java/edu/ucdavis/dss/ipa/services/jpa/JpaWorkloadAssignmentService.java @@ -138,11 +138,9 @@ public List generateWorkloadAssignments(long workgroupId, lo } List termCodeCensus = - termCodeCensusFutures.stream().map(CompletableFuture::join).flatMap(Collection::stream) - .filter(c -> "CURRENT".equals(c.getSnapshotCode())).collect(Collectors.toList()); + termCodeCensusFutures.stream().map(CompletableFuture::join).flatMap(Collection::stream).toList(); List courseCensus = - courseCensusFutures.stream().map(CompletableFuture::join).flatMap(Collection::stream) - .filter(c -> "CURRENT".equals(c.getSnapshotCode())).collect(Collectors.toList()); + courseCensusFutures.stream().map(CompletableFuture::join).flatMap(Collection::stream).toList(); Map> termCodeCensusMap = generateCensusMap(termCodeCensus); Map> courseCensusMap = generateCensusMap(courseCensus);