-
Notifications
You must be signed in to change notification settings - Fork 1
Get multiple statuses at once #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
225e2d6
92907cc
cb97b2e
e1eea3d
6a1756e
1d43e01
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -232,6 +232,14 @@ public LoadFlowStatus findStatus(UUID resultUuid) { | |
| return globalEntity != null ? globalEntity.getStatus() : null; | ||
| } | ||
|
|
||
| @Override | ||
| @Transactional(readOnly = true) | ||
| public Map<UUID, LoadFlowStatus> findStatuses(List<UUID> resultUuids) { | ||
| Objects.requireNonNull(resultUuids); | ||
| List<GlobalStatusEntity> globalEntities = globalStatusRepository.findByResultUuidIn(resultUuids); | ||
| return globalEntities.stream().collect(Collectors.toMap(GlobalStatusEntity::getResultUuid, GlobalStatusEntity::getStatus)); | ||
| } | ||
|
Comment on lines
+236
to
240
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check GlobalStatusEntity field annotations for nullability constraints
rg -n -A2 'status' --type=java src/main/java/org/gridsuite/loadflow/server/entities/GlobalStatusEntity.javaRepository: gridsuite/loadflow-server Length of output: 210 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== LoadFlowResultService excerpt =="
sed -n '220,245p' src/main/java/org/gridsuite/loadflow/server/service/LoadFlowResultService.java | cat -n
echo
echo "== GlobalStatusEntity file =="
sed -n '1,120p' src/main/java/org/gridsuite/loadflow/server/entities/GlobalStatusEntity.java | cat -n
echo
echo "== Search for status nullability / schema constraints =="
rg -n --hidden --glob '!target/**' --glob '!build/**' --glob '!dist/**' \
'`@Column`\\(|nullable\\s*=\\s*false|status.*not null|not null.*status|GlobalStatusEntity' \
src main resources .Repository: gridsuite/loadflow-server Length of output: 2975 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== Search for globalStatus schema/migrations =="
rg -n --hidden --glob '!target/**' --glob '!build/**' --glob '!dist/**' \
'globalStatus|global_status|status' \
src/main/resources src/main/java
echo
echo "== Search for migration files =="
fd -a -t f '.*(sql|xml|yml|yaml)$' src/main/resources db . | sed -n '1,200p'Repository: gridsuite/loadflow-server Length of output: 11245 🏁 Script executed: #!/bin/bash
set -euo pipefail
sed -n '1,40p' src/main/resources/db/changelog/changesets/changelog_20230606T161304Z.xml | cat -nRepository: gridsuite/loadflow-server Length of output: 3073 Handle nullable
🤖 Prompt for AI Agents |
||
|
|
||
| public List<ComponentResultEntity> findComponentResults(UUID resultUuid, List<ResourceFilterDTO> resourceFilters, Sort sort) { | ||
| Objects.requireNonNull(resultUuid); | ||
| Specification<ComponentResultEntity> specification = componentResultSpecificationBuilder.buildSpecification(resultUuid, resourceFilters); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to delete it