Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<sonar.organization>gridsuite</sonar.organization>
<sonar.projectKey>org.gridsuite:network-modification-server</sonar.projectKey>
<!-- TODO network-modification.version remove when upgrading gridsuite dependencies -->
<network-modification.version>0.42.0</network-modification.version>
<network-modification.version>0.43.0-SNAPSHOT</network-modification.version>
<!-- FIXME: powsybl-network-store modules'version is overloaded in the dependencies section.The overloads and this property below have to be removed at next powsybl-ws-dependencies.version upgrade -->
<powsybl-network-store.version>1.31.0</powsybl-network-store.version>
<powsybl-balances-adjustment.version>2.14.1</powsybl-balances-adjustment.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import java.util.Map;

import org.gridsuite.modification.dto.*;
import org.gridsuite.modification.dto.tabular.*;
import org.gridsuite.modification.server.entities.equipment.creation.*;
import org.gridsuite.modification.server.entities.equipment.deletion.*;
import org.gridsuite.modification.server.entities.equipment.modification.*;
Expand All @@ -20,8 +21,7 @@
import org.gridsuite.modification.server.entities.equipment.modification.attribute.IntegerEquipmentAttributeModificationEntity;
import org.gridsuite.modification.server.entities.equipment.modification.attribute.StringEquipmentAttributeModificationEntity;
import org.gridsuite.modification.server.entities.equipment.modification.byfilter.*;
import org.gridsuite.modification.server.entities.tabular.TabularCreationEntity;
import org.gridsuite.modification.server.entities.tabular.TabularModificationEntity;
import org.gridsuite.modification.server.entities.tabular.TabularModificationsEntity;

/**
* @author Ayoub LABIDI <ayoub.labidi at rte-france.com>
Expand Down Expand Up @@ -50,7 +50,6 @@ private EntityRegistry() {
register(ConverterStationCreationInfos.class, ConverterStationCreationEntity.class);
register(LccCreationInfos.class, LccCreationEntity.class);
register(LccConverterStationCreationInfos.class, LccConverterStationCreationEntity.class);
register(TabularCreationInfos.class, TabularCreationEntity.class);
register(CreateVoltageLevelSectionInfos.class, CreateVoltageLevelSectionEntity.class);

// // modification
Expand All @@ -64,8 +63,6 @@ private EntityRegistry() {
register(ShuntCompensatorModificationInfos.class, ShuntCompensatorModificationEntity.class);
register(VscModificationInfos.class, VscModificationEntity.class);
register(ConverterStationModificationInfos.class, ConverterStationModificationEntity.class);
register(TabularModificationInfos.class, TabularModificationEntity.class);
register(LimitSetsTabularModificationInfos.class, TabularModificationEntity.class);
register(ByFormulaModificationInfos.class, ByFormulaModificationEntity.class);
register(ModificationByAssignmentInfos.class, ModificationByAssignmentEntity.class);
register(EquipmentAttributeModificationInfos.class, EquipmentAttributeModificationEntity.class);
Expand All @@ -76,6 +73,11 @@ private EntityRegistry() {
register(CreateVoltageLevelTopologyInfos.class, CreateVoltageLevelTopologyEntity.class);
register(MoveVoltageLevelFeederBaysInfos.class, MoveVoltageLevelFeederBaysEntity.class);

// tabular
register(TabularCreationInfos.class, TabularModificationsEntity.class);
register(TabularModificationInfos.class, TabularModificationsEntity.class);
register(LimitSetsTabularModificationInfos.class, TabularModificationsEntity.class);

// // attatching and splitting
register(LineAttachToVoltageLevelInfos.class, LineAttachToVoltageLevelEntity.class);
register(LineSplitWithVoltageLevelInfos.class, LineSplitWithVoltageLevelEntity.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,14 @@ public void update(ModificationInfos modificationInfos) {

private void assignAttributes(EquipmentModificationInfos equipmentModificationInfos) {
equipmentId = equipmentModificationInfos.getEquipmentId();
List<FreePropertyEntity> newProperties = equipmentModificationInfos.getProperties() == null ? null :
List<FreePropertyEntity> newProperties = equipmentModificationInfos.getProperties() == null ? List.of() :
equipmentModificationInfos.getProperties().stream()
.map(FreePropertyEntity::new)
.toList();
if (this.properties != null) {
// update using the same reference with clear/add (to avoid JPA exception)
this.properties.clear();
if (newProperties != null) {
this.properties.addAll(newProperties);
}
this.properties.addAll(newProperties);
} else {
this.properties = newProperties;
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading