File tree Expand file tree Collapse file tree 1 file changed +1
-18
lines changed
src/main/java/org/gridsuite/modification/server/entities/tabular Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -67,24 +67,7 @@ public void update(ModificationInfos modificationInfos) {
6767
6868 @ Override
6969 public TabularBaseInfos toModificationInfos () {
70- var builder = switch (ModificationType .valueOf (getType ())) {
71- case ModificationType .TABULAR_CREATION -> TabularCreationInfos .builder ();
72- case ModificationType .LIMIT_SETS_TABULAR_MODIFICATION -> LimitSetsTabularModificationInfos .builder ();
73- default -> TabularModificationInfos .builder ();
74- };
75- List <ModificationInfos > modificationsInfos = modifications .stream ().map (ModificationEntity ::toModificationInfos ).collect (Collectors .toList ());
76- return builder
77- .date (getDate ())
78- .uuid (getId ())
79- .stashed (getStashed ())
80- .activated (getActivated ())
81- .modificationType (modificationType )
82- .modifications (modificationsInfos )
83- .properties (CollectionUtils .isEmpty (getProperties ()) ? null : getProperties ().stream ()
84- .map (TabularPropertyEntity ::toInfos )
85- .toList ())
86- .csvFilename (getCsvFilename ())
87- .build ();
70+ throw new UnsupportedOperationException ("Tabular DTO must be retrieved with NetworkModificationRepository::getModificationInfos" );
8871 }
8972
9073 private void assignAttributes (TabularBaseInfos tabularBaseInfos ) {
You can’t perform that action at this time.
0 commit comments