-
Notifications
You must be signed in to change notification settings - Fork 0
allow to have a list of temporary limits in line catalog #764
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
Open
EtienneLt
wants to merge
21
commits into
main
Choose a base branch
from
upgrade-temporary-limits-catalog
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
c96609c
allow to have a list of temporary limits in line catalog
EtienneLt 38c604b
clean code
EtienneLt c3997f3
for line catalog allow to have several temporary limits
EtienneLt 2d5683d
checkstyle
EtienneLt 30d801e
fix tests
EtienneLt d519030
fix
EtienneLt 7805b12
Merge branch 'main' into upgrade-temporary-limits-catalog
EtienneLt 8b7c0c7
fix
EtienneLt e680116
fix sonar
EtienneLt e972bf4
fix
EtienneLt b51b241
fix
EtienneLt e6f8675
fix issue
EtienneLt 3c0c690
fix
EtienneLt 7864969
review
EtienneLt 8853c81
change peek to for loop
EtienneLt 0c3c2a5
revert blanks
EtienneLt a099c06
fix
EtienneLt 86094f8
speed up deleting catalog
EtienneLt f096ad7
Merge branch 'main' into upgrade-temporary-limits-catalog
EtienneLt 0aa4434
fix logs
EtienneLt cb4f441
Merge branch 'main' into upgrade-temporary-limits-catalog
Mathieu-Deharbe 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
48 changes: 48 additions & 0 deletions
48
src/main/java/org/gridsuite/modification/server/dto/catalog/TemporaryLimitInfos.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,48 @@ | ||
| /** | ||
| * 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/. | ||
| * SPDX-License-Identifier: MPL-2.0 | ||
| */ | ||
| package org.gridsuite.modification.server.dto.catalog; | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
| import lombok.Setter; | ||
| import lombok.experimental.SuperBuilder; | ||
| import org.gridsuite.modification.server.entities.catalog.TemporaryLimitEntity; | ||
|
|
||
| import java.util.UUID; | ||
|
|
||
| /** | ||
| * @author Etienne Lesot <etienne.lesot at rte-france.com> | ||
| */ | ||
| @SuperBuilder | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| @Getter | ||
| @Setter | ||
| @Schema(description = "Temporary limit infos") | ||
| public class TemporaryLimitInfos { | ||
| @Schema(description = "id") | ||
| private UUID id; | ||
|
|
||
| @Schema(description = "Temporary limit value") | ||
| private Double limitValue; | ||
|
|
||
| @Schema(description = "Temporary limit acceptable duration") | ||
| private Integer acceptableDuration; | ||
|
|
||
| @Schema(description = "Temporary limit name") | ||
| private String name; | ||
|
|
||
| public TemporaryLimitEntity toTemporaryLimitEntity() { | ||
| return TemporaryLimitEntity.builder() | ||
| .limitValue(limitValue) | ||
| .acceptableDuration(acceptableDuration) | ||
| .name(name).build(); | ||
| } | ||
| } |
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
54 changes: 54 additions & 0 deletions
54
src/main/java/org/gridsuite/modification/server/entities/catalog/TemporaryLimitEntity.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,54 @@ | ||
| /** | ||
| * 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/. | ||
| * SPDX-License-Identifier: MPL-2.0 | ||
| */ | ||
| package org.gridsuite.modification.server.entities.catalog; | ||
|
|
||
| import jakarta.persistence.*; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
| import lombok.Setter; | ||
| import lombok.experimental.SuperBuilder; | ||
| import org.gridsuite.modification.server.dto.catalog.TemporaryLimitInfos; | ||
|
|
||
| import java.util.UUID; | ||
|
|
||
| /** | ||
| * @author Etienne Lesot <etienne.lesot at rte-france.com> | ||
| */ | ||
| @Getter | ||
| @Setter | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| @SuperBuilder | ||
| @Entity | ||
| @Table(name = "temporary_limit_for_line_catalog") | ||
| public class TemporaryLimitEntity { | ||
|
|
||
| @Id | ||
| @GeneratedValue(strategy = GenerationType.AUTO) | ||
| @Column(name = "id") | ||
| private UUID id; | ||
|
|
||
| @Column | ||
| private Double limitValue; | ||
|
|
||
| @Column | ||
| private Integer acceptableDuration; | ||
|
|
||
| @Column | ||
| private String name; | ||
|
|
||
| public TemporaryLimitInfos toTemporaryLimitInfos() { | ||
| return TemporaryLimitInfos.builder() | ||
| .id(id) | ||
| .limitValue(limitValue) | ||
| .acceptableDuration(acceptableDuration) | ||
| .name(name) | ||
| .build(); | ||
| } | ||
| } |
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.
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.