-
Notifications
You must be signed in to change notification settings - Fork 0
Move contingency lists to SA parameters #220
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
3da711f
draft version
carojeandat 357b562
add several contingencies for each contingencyList + get contingencie…
carojeandat c3f8d59
add changelog
carojeandat c529e1f
add changelog
carojeandat 40863e6
fix index name
carojeandat eea3192
fix
carojeandat 3075176
address review comments
carojeandat f4d1817
fix name
carojeandat 764b192
fix changelog
carojeandat f2e8f91
Merge branch 'main' into move-contingency-lists-to-sa-parameters
carojeandat 499ff68
address review comments & fix existing tests
carojeandat 2db5463
add tests
carojeandat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/main/java/org/gridsuite/securityanalysis/server/dto/ElementAttributes.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| /** | ||
| * Copyright (c) 2026, RTE (http://www.rte-france.com) | ||
| * This Source Code Form is subject to the terms of the Mozilla Public | ||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
| */ | ||
| package org.gridsuite.securityanalysis.server.dto; | ||
|
|
||
| import lombok.AllArgsConstructor; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
| import lombok.Setter; | ||
|
|
||
| import java.util.UUID; | ||
|
|
||
| /** | ||
| * partial type from ElementAttributes (Directory-server) | ||
| * @author Caroline Jeandat {@literal <caroline.jeandat at rte-france.com>} | ||
| */ | ||
| @AllArgsConstructor | ||
| @NoArgsConstructor | ||
| public class ElementAttributes { | ||
| @Getter | ||
| private UUID elementUuid; | ||
| @Setter | ||
| @Getter | ||
| private String elementName; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...main/java/org/gridsuite/securityanalysis/server/dto/parameters/ContingencyListsInfos.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| /** | ||
| * Copyright (c) 2026, RTE (http://www.rte-france.com) | ||
| * This Source Code Form is subject to the terms of the Mozilla Public | ||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
| */ | ||
| package org.gridsuite.securityanalysis.server.dto.parameters; | ||
| import lombok.*; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| /** | ||
| * @author Caroline Jeandat {@literal <caroline.jeandat at rte-france.com>} | ||
| */ | ||
| @Builder | ||
| @AllArgsConstructor | ||
| @NoArgsConstructor | ||
| @Getter | ||
| @Setter | ||
| public class ContingencyListsInfos { | ||
| private List<IdNameInfos> contingencyLists; | ||
| private String description; | ||
| private boolean activated; | ||
| } |
26 changes: 26 additions & 0 deletions
26
src/main/java/org/gridsuite/securityanalysis/server/dto/parameters/IdNameInfos.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| /** | ||
| * Copyright (c) 2026, RTE (http://www.rte-france.com) | ||
| * This Source Code Form is subject to the terms of the Mozilla Public | ||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
| */ | ||
| package org.gridsuite.securityanalysis.server.dto.parameters; | ||
|
|
||
| import lombok.AllArgsConstructor; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
| import lombok.Setter; | ||
|
|
||
| import java.util.UUID; | ||
|
|
||
| /** | ||
| * @author Caroline Jeandat {@literal <caroline.jeandat at rte-france.com>} | ||
| */ | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| @Getter | ||
| @Setter | ||
| public class IdNameInfos { | ||
| private UUID id; | ||
| private String name; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
.../java/org/gridsuite/securityanalysis/server/entities/ParametersContingencyListEntity.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| /** | ||
| * Copyright (c) 2026, RTE (http://www.rte-france.com) | ||
| * This Source Code Form is subject to the terms of the Mozilla Public | ||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
| */ | ||
| package org.gridsuite.securityanalysis.server.entities; | ||
|
|
||
| import jakarta.persistence.*; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
| import lombok.Setter; | ||
|
|
||
| import java.util.List; | ||
| import java.util.UUID; | ||
|
|
||
| /** | ||
| * @author Caroline Jeandat {@literal <caroline.jeandat at rte-france.com>} | ||
| */ | ||
| @Getter | ||
| @Setter | ||
| @NoArgsConstructor | ||
| @Entity | ||
| @Table(name = "parameters_contingency_lists", indexes = {@Index(name = "idx_parameters_contingency_lists_security_analysis_parameters_id", columnList = "security_analysis_parameters_id")}) | ||
| public class ParametersContingencyListEntity { | ||
|
|
||
| @Id | ||
| @GeneratedValue(strategy = GenerationType.UUID) | ||
| @Column(name = "id") | ||
| private UUID id; | ||
|
|
||
| @ElementCollection | ||
| @CollectionTable( | ||
| name = "parameters_contingency_lists_contingency_list", | ||
| joinColumns = @JoinColumn(name = "parameters_contingency_lists_id"), | ||
| foreignKey = @ForeignKey(name = "parameters_contingency_lists_id_fk") | ||
| ) | ||
| @Column(name = "contingency_list_id") | ||
| private List<UUID> contingencyListIds; | ||
|
|
||
| @Column(name = "description") | ||
| private String description; | ||
|
|
||
| @Column(name = "activated") | ||
| private boolean activated; | ||
|
|
||
| @ManyToOne | ||
| @JoinColumn(name = "security_analysis_parameters_id", foreignKey = @ForeignKey(name = "security_analysis_parameters_id_fk")) | ||
| private SecurityAnalysisParametersEntity securityAnalysisParameters; | ||
carojeandat marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| public ParametersContingencyListEntity(List<UUID> contingencyListIds, String description, boolean activated) { | ||
| this.contingencyListIds = contingencyListIds; | ||
| this.description = description; | ||
| this.activated = activated; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.