Skip to content

Commit

Permalink
set stashed status for all modification #346
Browse files Browse the repository at this point in the history
Signed-off-by: jamal-khey <[email protected]>
  • Loading branch information
jamal-khey committed Oct 11, 2023
1 parent 288e6c7 commit 21c6d4f
Show file tree
Hide file tree
Showing 31 changed files with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public GroovyScriptInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.script(getScript());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public BatteryCreationInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.equipmentId(getEquipmentId())
.equipmentName(getEquipmentName())
.voltageLevelId(getVoltageLevelId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ public GeneratorCreationInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.equipmentId(getEquipmentId())
.equipmentName(getEquipmentName())
.voltageLevelId(getVoltageLevelId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public LineCreationInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.equipmentId(getEquipmentId())
.equipmentName(getEquipmentName())
.seriesResistance(getSeriesResistance())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public LoadCreationInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.equipmentId(getEquipmentId())
.equipmentName(getEquipmentName())
.voltageLevelId(getVoltageLevelId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public ShuntCompensatorCreationInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.equipmentId(getEquipmentId())
.equipmentName(getEquipmentName())
.voltageLevelId(getVoltageLevelId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public SubstationCreationInfos toSubstationCreationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.equipmentId(getEquipmentId())
.equipmentName(getEquipmentName())
.substationCountry(getCountry())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ public TwoWindingsTransformerCreationInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.equipmentId(getEquipmentId())
.equipmentName(getEquipmentName())
.seriesResistance(getSeriesResistance())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public VoltageLevelCreationInfos toVoltageLevelCreationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.equipmentId(getEquipmentId())
.equipmentName(getEquipmentName())
.substationId(getSubstationId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ public VscCreationInfos toModificationInfos() {
return VscCreationInfos.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.equipmentId(getEquipmentId())
.equipmentName(getEquipmentName())
.activePower(getActivePower())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public EquipmentDeletionInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.equipmentId(getEquipmentId())
.equipmentType(getEquipmentType());
if (equipmentInfos != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public BatteryModificationInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.equipmentId(getEquipmentId())
.equipmentName(AttributeModification.toAttributeModification(getEquipmentNameValue(), getEquipmentNameOp()))
.voltageLevelId(AttributeModification.toAttributeModification(getVoltageLevelIdValue(), getVoltageLevelIdOp()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public BranchStatusModificationInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.equipmentId(getEquipmentId())
.action(getAction())
.energizedVoltageLevelId(getEnergizedVoltageLevelId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public DeleteAttachingLineInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.lineToAttachTo1Id(getLineToAttachTo1Id())
.lineToAttachTo2Id(getLineToAttachTo2Id())
.attachedLineId(getAttachedLineId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public DeleteVoltageLevelOnLineInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.lineToAttachTo1Id(getLineToAttachTo1Id())
.lineToAttachTo2Id(getLineToAttachTo2Id())
.replacingLine1Id(getReplacingLine1Id())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ public GenerationDispatchInfos toModificationInfos() {
return GenerationDispatchInfos.builder()
.date(getDate())
.uuid(getId())
.stashed(getStashed())
.lossCoefficient(getLossCoefficient())
.defaultOutageRate(getDefaultOutageRate())
.generatorsWithoutOutage(toGeneratorsFilters(generatorsWithoutOutage))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ public GeneratorModificationInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.equipmentId(getEquipmentId())
.equipmentName(AttributeModification.toAttributeModification(getEquipmentNameValue(), getEquipmentNameOp()))
.voltageLevelId(AttributeModification.toAttributeModification(getVoltageLevelIdValue(), getVoltageLevelIdOp()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public GeneratorScalingInfos toModificationInfos() {
return GeneratorScalingInfos.builder()
.date(getDate())
.uuid(getId())
.stashed(getStashed())
.variationType(getVariationType())
.variations(getVariations().stream()
.map(ScalingVariationEntity::toScalingVariationInfos)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public LineAttachToVoltageLevelInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.lineToAttachToId(getLineToAttachToId())
.percent(getPercent())
.attachmentPointId(getAttachmentPointId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public LineModificationInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.equipmentId(getEquipmentId())
.equipmentName(AttributeModification.toAttributeModification(getEquipmentNameValue(), getEquipmentNameOp()))
.seriesResistance(toAttributeModification(getSeriesResistance()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public LineSplitWithVoltageLevelInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.lineToSplitId(getLineToSplitId())
.percent(getPercent())
.mayNewVoltageLevelInfos(mayVoltageLevelCreation == null ? null : mayVoltageLevelCreation.toVoltageLevelCreationInfos())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ private LinesAttachToSplitLinesInfos.LinesAttachToSplitLinesInfosBuilder toLines
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.lineToAttachTo1Id(getLineToAttachTo1Id())
.lineToAttachTo2Id(getLineToAttachTo2Id())
.attachedLineId(getAttachedLineId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public LoadModificationInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.equipmentId(getEquipmentId())
.equipmentName(AttributeModification.toAttributeModification(getEquipmentNameValue(), getEquipmentNameOp()))
.voltageLevelId(AttributeModification.toAttributeModification(getVoltageLevelIdValue(), getVoltageLevelIdOp()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public LoadScalingInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.variationType(getVariationType())
.variations(getVariations().stream()
.map(ScalingVariationEntity::toScalingVariationInfos)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public ShuntCompensatorModificationInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.voltageLevelId(getVoltageLevelId())
.equipmentId(getEquipmentId())
.equipmentName(toAttributeModification(getEquipmentNameValue(), getEquipmentNameOp()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public SubstationModificationInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.equipmentId(getEquipmentId())
.equipmentName(AttributeModification.toAttributeModification(getEquipmentNameValue(), getEquipmentNameOp()))
.substationCountry(AttributeModification.toAttributeModification(getSubstationCountryValue(), getSubstationCountryOp()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ public TwoWindingsTransformerModificationInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.equipmentId(getEquipmentId())
.equipmentName(AttributeModification.toAttributeModification(getEquipmentNameValue(), getEquipmentNameOp()))
.seriesResistance(AttributeModification.toAttributeModification(getSeriesResistance()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ public VoltageInitModificationInfos toModificationInfos() {
return VoltageInitModificationInfos.builder()
.date(getDate())
.uuid(getId())
.stashed(getStashed())
.generators(toGeneratorsModification(generators))
.transformers(toTransformersModification(transformers))
.staticVarCompensators(toStaticVarCompensatorsModification(staticVarCompensators))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public VoltageLevelModificationInfos toModificationInfos() {
.uuid(getId())
.equipmentId(getEquipmentId())
.date(getDate())
.stashed(getStashed())
.equipmentName(toAttributeModification(getEquipmentNameValue(), getEquipmentNameOp()))
.nominalVoltage(toAttributeModification(getNominalVoltage()))
.lowVoltageLimit(toAttributeModification(getLowVoltageLimit()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public EquipmentAttributeModificationInfos toModificationInfos() {
.builder()
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.equipmentId(getEquipmentId())
.equipmentAttributeName(getAttributeName())
.equipmentAttributeValue(getAttributeValue())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ public List<ModificationInfos> getModificationsMetadata(UUID groupUuid, boolean
}

public List<ModificationInfos> getModificationsInfos(List<UUID> groupUuids, boolean stashedModifications) {
// List modif = groupUuids.stream().flatMap(this::getModificationEntityStream).toList();
return groupUuids.stream().flatMap(this::getModificationEntityStream)
.filter(m -> m.getStashed() == stashedModifications)
.map(ModificationEntity::toModificationInfos)
Expand Down

0 comments on commit 21c6d4f

Please sign in to comment.