Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
-
0b0ed727
by tchemit at 2020-03-28T09:45:16+01:00
19 changed files:
- client-core/src/main/i18n/getters/jaxx.getter
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/seine/FloatingObjectTransmittingBuoyOperationUI.jaxx
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/seine/FloatingObjectTransmittingBuoyOperationUI.jcss
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/seine/FloatingObjectTransmittingBuoyOperationUIHandler.java
- dto/src/main/java/fr/ird/observe/binder/data/seine/TransmittingBuoyDtoReferenceBinder.java
- dto/src/main/java/fr/ird/observe/dto/decoration/DecoratorService.java
- dto/src/main/models/Observe.model
- persistence/src/main/java/fr/ird/observe/binder/data/seine/TransmittingBuoyEntityDtoBinder.java
- persistence/src/main/java/fr/ird/observe/binder/data/seine/TransmittingBuoyEntityReferenceBinder.java
- + persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_5.java
- persistence/src/main/models/Observe.model
- + persistence/src/main/resources/db/migration/7.5/01_migrate_TransmittingBuoyOperation_brand-H2.sql
- + persistence/src/main/resources/db/migration/7.5/01_migrate_TransmittingBuoyOperation_brand-PG.sql
- pom.xml
- + test/src/main/resources/db/7.5/dataForTestLongline.sql.gz
- + test/src/main/resources/db/7.5/dataForTestSeine.sql.gz
- + test/src/main/resources/db/7.5/empty_h2.sql.gz
- + test/src/main/resources/db/7.5/empty_pg.sql.gz
- + test/src/main/resources/db/7.5/referentiel.sql.gz
Changes:
| ... | ... | @@ -639,7 +639,6 @@ observe.common.TdrDto.serialNo |
| 639 | 639 |
observe.common.TdrDto.speciesTab
|
| 640 | 640 |
observe.common.TdrDto.timestampTab
|
| 641 | 641 |
observe.common.TdrDto.title
|
| 642 |
-observe.common.TransmittingBuoyDto.brand
|
|
| 643 | 642 |
observe.common.TransmittingBuoyDto.noBuoy
|
| 644 | 643 |
observe.common.TransmittingBuoyDto.ownership
|
| 645 | 644 |
observe.common.TransmittingBuoyDto.title
|
| ... | ... | @@ -177,11 +177,8 @@ |
| 177 | 177 |
</cell>
|
| 178 | 178 |
</row>
|
| 179 | 179 |
<row>
|
| 180 |
- <cell anchor='west'>
|
|
| 181 |
- <JLabel id='brand1Label'/>
|
|
| 182 |
- </cell>
|
|
| 183 |
- <cell anchor='east' weightx="1" fill="both">
|
|
| 184 |
- <JTextField id='brand1' onKeyReleased='transmittingBuoy1.setBrand(brand1.getText())'/>
|
|
| 180 |
+ <cell columns='2' fill="both" weighty="1">
|
|
| 181 |
+ <JComment id='comment1'/>
|
|
| 185 | 182 |
</cell>
|
| 186 | 183 |
</row>
|
| 187 | 184 |
</Table>
|
| ... | ... | @@ -239,11 +236,8 @@ |
| 239 | 236 |
</cell>
|
| 240 | 237 |
</row>
|
| 241 | 238 |
<row>
|
| 242 |
- <cell anchor='west'>
|
|
| 243 |
- <JLabel id='brand2Label'/>
|
|
| 244 |
- </cell>
|
|
| 245 |
- <cell anchor='east' weightx="1" fill="both">
|
|
| 246 |
- <JTextField id='brand2' onKeyReleased='transmittingBuoy2.setBrand(brand2.getText())'/>
|
|
| 239 |
+ <cell columns='2' weighty="1">
|
|
| 240 |
+ <JComment id='comment2'/>
|
|
| 247 | 241 |
</cell>
|
| 248 | 242 |
</row>
|
| 249 | 243 |
</Table>
|
| ... | ... | @@ -20,6 +20,10 @@ |
| 20 | 20 |
* #L%
|
| 21 | 21 |
*/
|
| 22 | 22 |
|
| 23 |
+JComment {
|
|
| 24 |
+ i18nProperty:comment;
|
|
| 25 |
+}
|
|
| 26 |
+ |
|
| 23 | 27 |
#model {
|
| 24 | 28 |
editable:true;
|
| 25 | 29 |
modified:{validator.isChanged() || validatorBalise1.isChanged() || validatorBalise2.isChanged()};
|
| ... | ... | @@ -106,12 +110,8 @@ |
| 106 | 110 |
text:{getStringValue(transmittingBuoy1.getCode())};
|
| 107 | 111 |
}
|
| 108 | 112 |
|
| 109 |
-#brand1Label {
|
|
| 110 |
- text:"observe.common.TransmittingBuoyDto.brand";
|
|
| 111 |
-}
|
|
| 112 |
- |
|
| 113 |
-#brand1 {
|
|
| 114 |
- text:{getStringValue(transmittingBuoy1.getBrand())};
|
|
| 113 |
+#comment1 {
|
|
| 114 |
+ model:{getTransmittingBuoy1()};
|
|
| 115 | 115 |
}
|
| 116 | 116 |
|
| 117 | 117 |
#transmittingBuoyOperation2Label {
|
| ... | ... | @@ -176,12 +176,8 @@ |
| 176 | 176 |
text:{getStringValue(transmittingBuoy2.getCode())};
|
| 177 | 177 |
}
|
| 178 | 178 |
|
| 179 |
-#brand2Label {
|
|
| 180 |
- text:"observe.common.TransmittingBuoyDto.brand";
|
|
| 181 |
-}
|
|
| 182 |
- |
|
| 183 |
-#brand2 {
|
|
| 184 |
- text:{getStringValue(transmittingBuoy2.getBrand())};
|
|
| 179 |
+#comment2 {
|
|
| 180 |
+ model:{getTransmittingBuoy2()};
|
|
| 185 | 181 |
}
|
| 186 | 182 |
|
| 187 | 183 |
#reset {
|
| ... | ... | @@ -163,8 +163,8 @@ public class FloatingObjectTransmittingBuoyOperationUIHandler extends ContentUIH |
| 163 | 163 |
FloatingObjectTransmittingBuoyOperationUI.BINDING_OWNERSHIP2_SELECTED_ITEM,
|
| 164 | 164 |
FloatingObjectTransmittingBuoyOperationUI.BINDING_TRANSMITTING_BUOY_TYPE1_SELECTED_ITEM,
|
| 165 | 165 |
FloatingObjectTransmittingBuoyOperationUI.BINDING_TRANSMITTING_BUOY_TYPE2_SELECTED_ITEM,
|
| 166 |
- FloatingObjectTransmittingBuoyOperationUI.BINDING_BRAND1_TEXT,
|
|
| 167 |
- FloatingObjectTransmittingBuoyOperationUI.BINDING_BRAND2_TEXT,
|
|
| 166 |
+// FloatingObjectTransmittingBuoyOperationUI.BINDING_COMMENT1_TEXT,
|
|
| 167 |
+// FloatingObjectTransmittingBuoyOperationUI.BINDING_COMMENT2_TEXT,
|
|
| 168 | 168 |
FloatingObjectTransmittingBuoyOperationUI.BINDING_COUNTRY1_SELECTED_ITEM,
|
| 169 | 169 |
FloatingObjectTransmittingBuoyOperationUI.BINDING_COUNTRY2_SELECTED_ITEM,
|
| 170 | 170 |
FloatingObjectTransmittingBuoyOperationUI.BINDING_VESSEL1_SELECTED_ITEM,
|
| ... | ... | @@ -198,8 +198,6 @@ public class FloatingObjectTransmittingBuoyOperationUIHandler extends ContentUIH |
| 198 | 198 |
FloatingObjectTransmittingBuoyOperationUI.BINDING_CODE2_TEXT,
|
| 199 | 199 |
FloatingObjectTransmittingBuoyOperationUI.BINDING_OWNERSHIP1_SELECTED_ITEM,
|
| 200 | 200 |
FloatingObjectTransmittingBuoyOperationUI.BINDING_OWNERSHIP2_SELECTED_ITEM,
|
| 201 |
- FloatingObjectTransmittingBuoyOperationUI.BINDING_BRAND1_TEXT,
|
|
| 202 |
- FloatingObjectTransmittingBuoyOperationUI.BINDING_BRAND2_TEXT,
|
|
| 203 | 201 |
FloatingObjectTransmittingBuoyOperationUI.BINDING_COUNTRY1_SELECTED_ITEM,
|
| 204 | 202 |
FloatingObjectTransmittingBuoyOperationUI.BINDING_COUNTRY2_SELECTED_ITEM,
|
| 205 | 203 |
FloatingObjectTransmittingBuoyOperationUI.BINDING_VESSEL1_SELECTED_ITEM,
|
| ... | ... | @@ -41,7 +41,7 @@ public class TransmittingBuoyDtoReferenceBinder extends DataDtoReferenceBinder<T |
| 41 | 41 |
@Override
|
| 42 | 42 |
public TransmittingBuoyReference toReference(ReferentialLocale referentialLocale, TransmittingBuoyDto dto) {
|
| 43 | 43 |
return new TransmittingBuoyReference(dto, dto.getCode(),
|
| 44 |
- dto.getBrand(),
|
|
| 44 |
+ dto.getComment(),
|
|
| 45 | 45 |
dto.getTransmittingBuoyType().getLabel(),
|
| 46 | 46 |
dto.getTransmittingBuoyOperation().getLabel());
|
| 47 | 47 |
}
|
| ... | ... | @@ -1013,8 +1013,8 @@ public class DecoratorService extends DecoratorProvider { |
| 1013 | 1013 |
@Override
|
| 1014 | 1014 |
public void initTransmittingBuoyDto() {
|
| 1015 | 1015 |
registerDataAndDataReferenceDecorator(TransmittingBuoyDto.class, TransmittingBuoyReference.class,
|
| 1016 |
- "${transmittingBuoyType/label}$s##${transmittingBuoyOperation/label}$s##${code}$s",
|
|
| 1017 |
- "${transmittingBuoyTypeLabel}$s##${transmittingBuoyOperationLabel}$s##${code}$s");
|
|
| 1016 |
+ "${transmittingBuoyType/label}$s##${transmittingBuoyOperation/label}$s##${code}$s##${comment}$s",
|
|
| 1017 |
+ "${transmittingBuoyTypeLabel}$s##${transmittingBuoyOperationLabel}$s##${code}$s##${comment}$s");
|
|
| 1018 | 1018 |
}
|
| 1019 | 1019 |
|
| 1020 | 1020 |
@Override
|
| ... | ... | @@ -801,9 +801,8 @@ nature + {*:1} String |
| 801 | 801 |
discarded + {*:1} Boolean
|
| 802 | 802 |
targetLength + {*} data.seine.TargetLength | ordered
|
| 803 | 803 |
|
| 804 |
-data.seine.TransmittingBuoy > data.Data | references=code,brand,transmittingBuoyTypeLabel,transmittingBuoyOperationLabel
|
|
| 804 |
+data.seine.TransmittingBuoy > data.Commentable | references=code,comment,transmittingBuoyTypeLabel,transmittingBuoyOperationLabel
|
|
| 805 | 805 |
code + {*:1} String | mayNotNull
|
| 806 |
-brand + {*:1} String
|
|
| 807 | 806 |
ownership + {*:1} !fr.ird.observe.dto.data.seine.Ownership
|
| 808 | 807 |
transmittingBuoyType {*:1} fr.ird.observe.dto.referential.seine.TransmittingBuoyTypeReference | notNull
|
| 809 | 808 |
transmittingBuoyOperation {*:1} fr.ird.observe.dto.referential.seine.TransmittingBuoyOperationReference | notNull
|
| ... | ... | @@ -44,7 +44,7 @@ public class TransmittingBuoyEntityDtoBinder extends DataEntityDtoBinderSupport< |
| 44 | 44 |
copyDtoDataFieldsToEntity(dto, entity);
|
| 45 | 45 |
|
| 46 | 46 |
entity.setCode(dto.getCode());
|
| 47 |
- entity.setBrand(dto.getBrand());
|
|
| 47 |
+ entity.setComment(dto.getComment());
|
|
| 48 | 48 |
entity.setOwnership(dto.getOwnership());
|
| 49 | 49 |
entity.setTransmittingBuoyOperation(toEntity(dto.getTransmittingBuoyOperation()));
|
| 50 | 50 |
entity.setTransmittingBuoyType(toEntity(dto.getTransmittingBuoyType()));
|
| ... | ... | @@ -59,7 +59,7 @@ public class TransmittingBuoyEntityDtoBinder extends DataEntityDtoBinderSupport< |
| 59 | 59 |
copyEntityDataFieldsToDto(entity, dto);
|
| 60 | 60 |
|
| 61 | 61 |
dto.setCode(entity.getCode());
|
| 62 |
- dto.setBrand(entity.getBrand());
|
|
| 62 |
+ dto.setComment(entity.getComment());
|
|
| 63 | 63 |
dto.setOwnership(entity.getOwnership());
|
| 64 | 64 |
dto.setTransmittingBuoyOperation(toReferentialReference(referentialLocale, entity.getTransmittingBuoyOperation()));
|
| 65 | 65 |
dto.setTransmittingBuoyType(toReferentialReference(referentialLocale, entity.getTransmittingBuoyType()));
|
| ... | ... | @@ -42,7 +42,7 @@ public class TransmittingBuoyEntityReferenceBinder extends DataEntityReferenceBi |
| 42 | 42 |
@Override
|
| 43 | 43 |
public TransmittingBuoyReference toReference(ReferentialLocale referentialLocale, TransmittingBuoy entity) {
|
| 44 | 44 |
return new TransmittingBuoyReference(entity, entity.getCode(),
|
| 45 |
- entity.getBrand(),
|
|
| 45 |
+ entity.getComment(),
|
|
| 46 | 46 |
entity.getTransmittingBuoyType().getLabel(referentialLocale),
|
| 47 | 47 |
entity.getTransmittingBuoyOperation().getLabel(referentialLocale));
|
| 48 | 48 |
}
|
| 1 |
+package fr.ird.observe.persistence.migration;
|
|
| 2 |
+ |
|
| 3 |
+/*-
|
|
| 4 |
+ * #%L
|
|
| 5 |
+ * ObServe :: Persistence
|
|
| 6 |
+ * %%
|
|
| 7 |
+ * Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io
|
|
| 8 |
+ * %%
|
|
| 9 |
+ * This program is free software: you can redistribute it and/or modify
|
|
| 10 |
+ * it under the terms of the GNU General Public License as
|
|
| 11 |
+ * published by the Free Software Foundation, either version 3 of the
|
|
| 12 |
+ * License, or (at your option) any later version.
|
|
| 13 |
+ *
|
|
| 14 |
+ * This program is distributed in the hope that it will be useful,
|
|
| 15 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
| 16 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
| 17 |
+ * GNU General Public License for more details.
|
|
| 18 |
+ *
|
|
| 19 |
+ * You should have received a copy of the GNU General Public
|
|
| 20 |
+ * License along with this program. If not, see
|
|
| 21 |
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
|
|
| 22 |
+ * #L%
|
|
| 23 |
+ */
|
|
| 24 |
+ |
|
| 25 |
+import com.google.auto.service.AutoService;
|
|
| 26 |
+import org.nuiton.topia.service.migration.resources.MigrationVersionResource;
|
|
| 27 |
+import org.nuiton.topia.service.migration.resources.MigrationVersionResourceExecutor;
|
|
| 28 |
+import org.nuiton.version.Versions;
|
|
| 29 |
+ |
|
| 30 |
+/**
|
|
| 31 |
+ * @author Tony Chemit - dev@tchemit.fr
|
|
| 32 |
+ * @since 7.5.0
|
|
| 33 |
+ */
|
|
| 34 |
+@AutoService(MigrationVersionResource.class)
|
|
| 35 |
+public class DataSourceMigrationForVersion_7_5 extends MigrationVersionResource {
|
|
| 36 |
+ |
|
| 37 |
+ public DataSourceMigrationForVersion_7_5() {
|
|
| 38 |
+ super(Versions.valueOf("7.5"));
|
|
| 39 |
+ }
|
|
| 40 |
+ |
|
| 41 |
+ @Override
|
|
| 42 |
+ public void generateSqlScript(MigrationVersionResourceExecutor executor) {
|
|
| 43 |
+ executor.addScript("01", "migrate_TransmittingBuoyOperation_brand");
|
|
| 44 |
+ }
|
|
| 45 |
+ |
|
| 46 |
+}
|
|
| 47 |
+ |
| ... | ... | @@ -837,9 +837,8 @@ nature + {*:1} String |
| 837 | 837 |
discarded + {*:1} Boolean
|
| 838 | 838 |
targetLength + {*} seine.TargetLength | ordered
|
| 839 | 839 |
|
| 840 |
-seine.TransmittingBuoy > ObserveDataEntity | entity
|
|
| 840 |
+seine.TransmittingBuoy > CommentableEntity | entity
|
|
| 841 | 841 |
code + {*:1} String
|
| 842 |
-brand + {*:1} String
|
|
| 843 | 842 |
ownership + {*:1} !fr.ird.observe.dto.data.seine.Ownership
|
| 844 | 843 |
transmittingBuoyType {*:1} referentiel.seine.TransmittingBuoyType
|
| 845 | 844 |
transmittingBuoyOperation {*:1} referentiel.seine.TransmittingBuoyOperation
|
| 1 |
+---
|
|
| 2 |
+-- #%L
|
|
| 3 |
+-- ObServe :: Persistence
|
|
| 4 |
+-- %%
|
|
| 5 |
+-- Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io
|
|
| 6 |
+-- %%
|
|
| 7 |
+-- This program is free software: you can redistribute it and/or modify
|
|
| 8 |
+-- it under the terms of the GNU General Public License as
|
|
| 9 |
+-- published by the Free Software Foundation, either version 3 of the
|
|
| 10 |
+-- License, or (at your option) any later version.
|
|
| 11 |
+--
|
|
| 12 |
+-- This program is distributed in the hope that it will be useful,
|
|
| 13 |
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
| 14 |
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
| 15 |
+-- GNU General Public License for more details.
|
|
| 16 |
+--
|
|
| 17 |
+-- You should have received a copy of the GNU General Public
|
|
| 18 |
+-- License along with this program. If not, see
|
|
| 19 |
+-- <http://www.gnu.org/licenses/gpl-3.0.html>.
|
|
| 20 |
+-- #L%
|
|
| 21 |
+---
|
|
| 22 |
+ALTER TABLE observe_seine.TransmittingBuoy ADD COLUMN comment VARCHAR(1024);
|
|
| 23 |
+UPDATE observe_seine.TransmittingBuoy SET comment = brand, topiaVersion = topiaVersion + 1;
|
|
| 24 |
+ALTER TABLE observe_seine.TransmittingBuoy DROP COLUMN brand;
|
| 1 |
+---
|
|
| 2 |
+-- #%L
|
|
| 3 |
+-- ObServe :: Persistence
|
|
| 4 |
+-- %%
|
|
| 5 |
+-- Copyright (C) 2008 - 2020 IRD, Code Lutin, Ultreia.io
|
|
| 6 |
+-- %%
|
|
| 7 |
+-- This program is free software: you can redistribute it and/or modify
|
|
| 8 |
+-- it under the terms of the GNU General Public License as
|
|
| 9 |
+-- published by the Free Software Foundation, either version 3 of the
|
|
| 10 |
+-- License, or (at your option) any later version.
|
|
| 11 |
+--
|
|
| 12 |
+-- This program is distributed in the hope that it will be useful,
|
|
| 13 |
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
| 14 |
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
| 15 |
+-- GNU General Public License for more details.
|
|
| 16 |
+--
|
|
| 17 |
+-- You should have received a copy of the GNU General Public
|
|
| 18 |
+-- License along with this program. If not, see
|
|
| 19 |
+-- <http://www.gnu.org/licenses/gpl-3.0.html>.
|
|
| 20 |
+-- #L%
|
|
| 21 |
+---
|
|
| 22 |
+ALTER TABLE observe_seine.TransmittingBuoy ADD COLUMN comment VARCHAR(1024);
|
|
| 23 |
+UPDATE observe_seine.TransmittingBuoy SET comment = brand, topiaVersion = topiaVersion + 1;
|
|
| 24 |
+ALTER TABLE observe_seine.TransmittingBuoy DROP COLUMN brand CASCADE ;
|
| ... | ... | @@ -149,7 +149,7 @@ |
| 149 | 149 |
<devMode>true</devMode>
|
| 150 | 150 |
|
| 151 | 151 |
<!--persistence model version-->
|
| 152 |
- <observe.model.version>7.4</observe.model.version>
|
|
| 152 |
+ <observe.model.version>7.5</observe.model.version>
|
|
| 153 | 153 |
|
| 154 | 154 |
<!-- build timestamp configuration -->
|
| 155 | 155 |
<maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format>
|
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type