Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe

Commits:

11 changed files:

Changes:

  • persistence/pom.xml
    ... ... @@ -274,6 +274,7 @@
    274 274
                   </inputs>
    
    275 275
                   <templates>
    
    276 276
                     org.nuiton.topia.templates.TopiaEntityDaoTransformer,
    
    277
    +                org.nuiton.topia.templates.TopiaEntityHibernateMappingGenerator,
    
    277 278
                     org.nuiton.topia.templates.TopiaMetaTransformer,
    
    278 279
                     org.nuiton.topia.templates.TopiaMetadataModelGenerator
    
    279 280
                   </templates>
    

  • persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_1.java
    ... ... @@ -44,6 +44,7 @@ public class DataSourceMigrationForVersion_7_1 extends MigrationVersionResource
    44 44
         public void generateSqlScript(MigrationVersionResourceExecutor executor) {
    
    45 45
             executor.addScript("01", "add_not_null_on_length_weight_parameters");
    
    46 46
             executor.addScript("02", "add_not_null_on_length_length_parameters");
    
    47
    +        executor.addScript("03", "add_not_null_on_technical_fields");
    
    47 48
         }
    
    48 49
     
    
    49 50
     }
    

  • persistence/src/main/resources/db/migration/7.1/03_add_not_null_on_technical_fields-common.sql
    1
    +---
    
    2
    +-- #%L
    
    3
    +-- ObServe :: Persistence
    
    4
    +-- %%
    
    5
    +-- Copyright (C) 2008 - 2019 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_longline.Activity ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    23
    +ALTER TABLE observe_longline.BaitsComposition ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    24
    +ALTER TABLE observe_longline.Basket ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    25
    +ALTER TABLE observe_longline.Branchline ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    26
    +ALTER TABLE observe_longline.BranchlinesComposition ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    27
    +ALTER TABLE observe_longline.Catch ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    28
    +ALTER TABLE observe_longline.Encounter ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    29
    +ALTER TABLE observe_longline.FloatlinesComposition ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    30
    +ALTER TABLE observe_longline.GearUseFeatures ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    31
    +ALTER TABLE observe_longline.GearUseFeaturesMeasurement ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    32
    +ALTER TABLE observe_longline.HooksComposition ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    33
    +ALTER TABLE observe_longline.Section ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    34
    +ALTER TABLE observe_longline.SensorUsed ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    35
    +ALTER TABLE observe_longline.Set ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    36
    +ALTER TABLE observe_longline.SizeMeasure ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    37
    +ALTER TABLE observe_longline.Tdr ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    38
    +ALTER TABLE observe_longline.TdrRecord ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    39
    +ALTER TABLE observe_longline.Trip ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    40
    +ALTER TABLE observe_longline.WeightMeasure ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    41
    +ALTER TABLE observe_common.Country ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    42
    +ALTER TABLE observe_common.DataQuality ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    43
    +ALTER TABLE observe_common.FpaZone ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    44
    +ALTER TABLE observe_common.Gear ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    45
    +ALTER TABLE observe_common.GearCaracteristic ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    46
    +ALTER TABLE observe_common.GearCaracteristicType ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    47
    +ALTER TABLE observe_common.Harbour ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    48
    +ALTER TABLE observe_common.LastUpdateDate ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    49
    +ALTER TABLE observe_common.LengthLengthParameter ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    50
    +ALTER TABLE observe_common.LengthWeightParameter ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    51
    +ALTER TABLE observe_common.Ocean ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    52
    +ALTER TABLE observe_common.Organism ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    53
    +ALTER TABLE observe_common.Person ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    54
    +ALTER TABLE observe_common.Program ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    55
    +ALTER TABLE observe_common.Sex ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    56
    +ALTER TABLE observe_common.ShipOwner ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    57
    +ALTER TABLE observe_common.SizeMeasureType ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    58
    +ALTER TABLE observe_common.Species ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    59
    +ALTER TABLE observe_common.SpeciesGroup ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    60
    +ALTER TABLE observe_common.SpeciesGroupReleaseMode ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    61
    +ALTER TABLE observe_common.SpeciesList ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    62
    +ALTER TABLE observe_common.Vessel ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    63
    +ALTER TABLE observe_common.VesselSizeCategory ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    64
    +ALTER TABLE observe_common.VesselType ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    65
    +ALTER TABLE observe_common.WeightMeasureType ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    66
    +ALTER TABLE observe_longline.BaitHaulingStatus ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    67
    +ALTER TABLE observe_longline.BaitSettingStatus ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    68
    +ALTER TABLE observe_longline.BaitType ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    69
    +ALTER TABLE observe_longline.CatchFate ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    70
    +ALTER TABLE observe_longline.EncounterType ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    71
    +ALTER TABLE observe_longline.Healthness ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    72
    +ALTER TABLE observe_longline.HookPosition ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    73
    +ALTER TABLE observe_longline.HookSize ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    74
    +ALTER TABLE observe_longline.HookType ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    75
    +ALTER TABLE observe_longline.ItemHorizontalPosition ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    76
    +ALTER TABLE observe_longline.ItemVerticalPosition ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    77
    +ALTER TABLE observe_longline.LightsticksColor ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    78
    +ALTER TABLE observe_longline.LightsticksType ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    79
    +ALTER TABLE observe_longline.LineType ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    80
    +ALTER TABLE observe_longline.MaturityStatus ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    81
    +ALTER TABLE observe_longline.MitigationType ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    82
    +ALTER TABLE observe_longline.SensorBrand ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    83
    +ALTER TABLE observe_longline.SensorDataFormat ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    84
    +ALTER TABLE observe_longline.SensorType ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    85
    +ALTER TABLE observe_longline.SettingShape ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    86
    +ALTER TABLE observe_longline.StomacFullness ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    87
    +ALTER TABLE observe_longline.TripType ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    88
    +ALTER TABLE observe_longline.VesselActivity ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    89
    +ALTER TABLE observe_seine.DetectionMode ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    90
    +ALTER TABLE observe_seine.NonTargetCatchReleaseConformity ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    91
    +ALTER TABLE observe_seine.NonTargetCatchReleaseStatus ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    92
    +ALTER TABLE observe_seine.NonTargetCatchReleasingTime ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    93
    +ALTER TABLE observe_seine.ObjectMaterial ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    94
    +ALTER TABLE observe_seine.ObjectMaterialType ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    95
    +ALTER TABLE observe_seine.ObjectOperation ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    96
    +ALTER TABLE observe_seine.ObservedSystem ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    97
    +ALTER TABLE observe_seine.ReasonForDiscard ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    98
    +ALTER TABLE observe_seine.ReasonForNoFishing ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    99
    +ALTER TABLE observe_seine.ReasonForNullSet ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    100
    +ALTER TABLE observe_seine.SpeciesFate ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    101
    +ALTER TABLE observe_seine.SpeciesStatus ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    102
    +ALTER TABLE observe_seine.SurroundingActivity ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    103
    +ALTER TABLE observe_seine.TransmittingBuoyOperation ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    104
    +ALTER TABLE observe_seine.TransmittingBuoyType ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    105
    +ALTER TABLE observe_seine.VesselActivity ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    106
    +ALTER TABLE observe_seine.WeightCategory ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    107
    +ALTER TABLE observe_seine.Wind ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    108
    +ALTER TABLE observe_seine.Activity ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    109
    +ALTER TABLE observe_seine.FloatingObject ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    110
    +ALTER TABLE observe_seine.FloatingObjectPart ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    111
    +ALTER TABLE observe_seine.GearUseFeaturesMeasurement ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    112
    +ALTER TABLE observe_seine.GearUseFeatures ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    113
    +ALTER TABLE observe_seine.NonTargetCatch ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    114
    +ALTER TABLE observe_seine.NonTargetCatchRelease ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    115
    +ALTER TABLE observe_seine.NonTargetLength ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    116
    +ALTER TABLE observe_seine.NonTargetSample ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    117
    +ALTER TABLE observe_seine.ObjectObservedSpecies ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    118
    +ALTER TABLE observe_seine.ObjectSchoolEstimate ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    119
    +ALTER TABLE observe_seine.Route ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    120
    +ALTER TABLE observe_seine.SchoolEstimate ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    121
    +ALTER TABLE observe_seine.Set ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    122
    +ALTER TABLE observe_seine.TargetCatch ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    123
    +ALTER TABLE observe_seine.TargetLength ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    124
    +ALTER TABLE observe_seine.TargetSample ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    125
    +ALTER TABLE observe_seine.TransmittingBuoy ALTER COLUMN topiaCreateDate SET NOT NULL;
    
    126
    +ALTER TABLE observe_seine.Trip ALTER COLUMN topiaCreateDate SET NOT NULL;

  • pom.xml
    ... ... @@ -165,7 +165,7 @@
    165 165
         <lib.version.java4all.eugene>3.0-alpha-26</lib.version.java4all.eugene>
    
    166 166
         <!--lib.version.java4all.jaxx>3.0-alpha-50</lib.version.java4all.jaxx-->
    
    167 167
         <!--<lib.version.java4all.i18n>4.0-beta-8-SNAPSHOT</lib.version.java4all.i18n>-->
    
    168
    -    <lib.version.java4all.topia>1.1.15</lib.version.java4all.topia>
    
    168
    +    <lib.version.java4all.topia>1.1.16</lib.version.java4all.topia>
    
    169 169
     
    
    170 170
         <!--<lib.version.nuiton.topia>3.6-SNAPSHOT</lib.version.nuiton.topia>-->
    
    171 171
         <!--<lib.version.java4all.eugene>3.0-alpha-21</lib.version.java4all.eugene>-->
    

  • services-local/src/main/java/fr/ird/observe/services/local/service/actions/synchro/referential/ng/ReferentialSynchronizeSqlsRequestBuilder.java
    ... ... @@ -22,8 +22,10 @@ package fr.ird.observe.services.local.service.actions.synchro.referential.ng;
    22 22
      * #L%
    
    23 23
      */
    
    24 24
     
    
    25
    +import com.google.common.collect.ArrayListMultimap;
    
    25 26
     import com.google.common.collect.ImmutableList;
    
    26 27
     import com.google.common.collect.ImmutableSet;
    
    28
    +import com.google.common.collect.Multimap;
    
    27 29
     import fr.ird.observe.binder.referential.ReferentialEntityDtoBinderSupport;
    
    28 30
     import fr.ird.observe.dto.reference.ReferentialDtoReference;
    
    29 31
     import fr.ird.observe.dto.referential.ReferentialDto;
    
    ... ... @@ -90,14 +92,17 @@ public class ReferentialSynchronizeSqlsRequestBuilder {
    90 92
     
    
    91 93
     
    
    92 94
             ImmutableSet<Class<? extends ReferentialDtoReference>> types = request.getTypes();
    
    95
    +
    
    96
    +        Multimap<Class<? extends ReferentialDtoReference>, String> newIds = request.getNewIds();
    
    97
    +
    
    93 98
             for (Class<? extends ReferentialDto> dtoType : DtoModelClasses.REFERENTIAL_TYPES) {
    
    94
    -            build0(dtoType, types);
    
    99
    +            build0(dtoType, types, newIds);
    
    95 100
             }
    
    96 101
             return resultBuilder.build();
    
    97 102
     
    
    98 103
         }
    
    99 104
     
    
    100
    -    private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void build0(Class<D> dtoType, ImmutableSet<Class<? extends ReferentialDtoReference>> types) {
    
    105
    +    private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void build0(Class<D> dtoType, ImmutableSet<Class<? extends ReferentialDtoReference>> types, Multimap<Class<? extends ReferentialDtoReference>, String> newIds) {
    
    101 106
     
    
    102 107
             ReferentialDtoEntityContext<D, R, E> modelContext = DbModelHelper.fromReferentialDto(dtoType);
    
    103 108
             Class<R> referenceType = modelContext.toReferenceType();
    
    ... ... @@ -117,13 +122,13 @@ public class ReferentialSynchronizeSqlsRequestBuilder {
    117 122
             if (log.isInfoEnabled()) {
    
    118 123
                 log.info("Add: " + addTasks.size());
    
    119 124
             }
    
    120
    -        onAdd(referentialName, referenceType, addTasks, binder);
    
    125
    +        onAdd(referentialName, referenceType, addTasks, binder, newIds);
    
    121 126
     
    
    122 127
             Set<ReferentialSynchronizeTask<R>> updateTasks = request.getUpdateTasks(referenceType);
    
    123 128
             if (log.isInfoEnabled()) {
    
    124 129
                 log.info("Update: " + updateTasks.size());
    
    125 130
             }
    
    126
    -        onUpdate(referentialName, referenceType, updateTasks, binder);
    
    131
    +        onUpdate(referentialName, referenceType, updateTasks, binder, newIds);
    
    127 132
     
    
    128 133
             Set<ReferentialSynchronizeTask<R>> revertTasks = request.getRevertTasks(referenceType);
    
    129 134
             if (log.isInfoEnabled()) {
    
    ... ... @@ -145,7 +150,7 @@ public class ReferentialSynchronizeSqlsRequestBuilder {
    145 150
     
    
    146 151
         }
    
    147 152
     
    
    148
    -    private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void onAdd(String referentialName, Class<R> referenceType, Set<ReferentialSynchronizeTask<R>> tasks, ReferentialEntityDtoBinderSupport<D, E> binder) {
    
    153
    +    private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void onAdd(String referentialName, Class<R> referenceType, Set<ReferentialSynchronizeTask<R>> tasks, ReferentialEntityDtoBinderSupport<D, E> binder, Multimap<Class<? extends ReferentialDtoReference>, String> newIds) {
    
    149 154
     
    
    150 155
             Class<E> entityType = binder.getEntityType();
    
    151 156
             Class<D> dtoType = binder.getDtoType();
    
    ... ... @@ -153,7 +158,9 @@ public class ReferentialSynchronizeSqlsRequestBuilder {
    153 158
             List<E> insertEntities = loadEntities(entityType, tasks);
    
    154 159
             if (metadata.withEntities()) {
    
    155 160
     
    
    156
    -            InsertSqlWithCascadeStatementGenerator<D> insertGenerator = new InsertSqlWithCascadeStatementGenerator<D>(metadataModel, metadata, dtoType, request.getIdsOnlyExistingOnThisSide()) {
    
    161
    +            Multimap<Class<? extends ReferentialDtoReference>, String> allIds = ArrayListMultimap.create(request.getIdsOnlyExistingOnThisSide());
    
    162
    +            allIds.putAll(newIds);
    
    163
    +            InsertSqlWithCascadeStatementGenerator<D> insertGenerator = new InsertSqlWithCascadeStatementGenerator<D>(metadataModel, metadata, dtoType, allIds) {
    
    157 164
     
    
    158 165
                     @Override
    
    159 166
                     protected <DD extends ReferentialDto> ImmutableList<String> insertMissingReferential(Class<DD> referentialType, String id) {
    
    ... ... @@ -188,7 +195,7 @@ public class ReferentialSynchronizeSqlsRequestBuilder {
    188 195
     
    
    189 196
         }
    
    190 197
     
    
    191
    -    private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void onUpdate(String referentialName, Class<R> referenceType, Set<ReferentialSynchronizeTask<R>> tasks, ReferentialEntityDtoBinderSupport<D, E> binder) {
    
    198
    +    private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void onUpdate(String referentialName, Class<R> referenceType, Set<ReferentialSynchronizeTask<R>> tasks, ReferentialEntityDtoBinderSupport<D, E> binder, Multimap<Class<? extends ReferentialDtoReference>, String> newIds) {
    
    192 199
     
    
    193 200
             Class<D> dtoType = binder.getDtoType();
    
    194 201
             TopiaMetadataEntity metadata = metadataModel.getEntity(referentialName);
    
    ... ... @@ -197,6 +204,10 @@ public class ReferentialSynchronizeSqlsRequestBuilder {
    197 204
     
    
    198 205
             if (metadata.withEntities()) {
    
    199 206
     
    
    207
    +
    
    208
    +            Multimap<Class<? extends ReferentialDtoReference>, String> allIds = ArrayListMultimap.create(request.getIdsOnlyExistingOnThisSide());
    
    209
    +            allIds.putAll(newIds);
    
    210
    +
    
    200 211
                 UpdateSqlWithCascadeStatementGenerator<D> updateGenerator = new UpdateSqlWithCascadeStatementGenerator<D>(metadataModel, metadata, dtoType, request.getIdsOnlyExistingOnThisSide()) {
    
    201 212
     
    
    202 213
                     @Override
    

  • services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/ng/ReferentialSynchronizeRequest.java
    ... ... @@ -71,6 +71,14 @@ public class ReferentialSynchronizeRequest implements ObserveDto {
    71 71
             return idsOnlyExistingOnThisSide;
    
    72 72
         }
    
    73 73
     
    
    74
    +    public Multimap<Class<? extends ReferentialDtoReference>, String> getNewIds() {
    
    75
    +        Multimap<Class<? extends ReferentialDtoReference>, String> result = ArrayListMultimap.create();
    
    76
    +        for (ReferentialSynchronizeTask<?> task : tasks.get(ReferentialSynchronizeTaskType.ADD)) {
    
    77
    +            result.put(task.getReferentialType(), task.getReferentialId());
    
    78
    +        }
    
    79
    +        return result;
    
    80
    +    }
    
    81
    +
    
    74 82
         public ImmutableMultimap<ReferentialSynchronizeTaskType, ReferentialSynchronizeTask<?>> getTasks() {
    
    75 83
             return tasks;
    
    76 84
         }
    

  • test/src/main/resources/db/7.1/dataForTestLongline.sql.gz
    No preview for this file type
  • test/src/main/resources/db/7.1/dataForTestSeine.sql.gz
    No preview for this file type
  • test/src/main/resources/db/7.1/empty_h2.sql.gz
    No preview for this file type
  • test/src/main/resources/db/7.1/empty_pg.sql.gz
    No preview for this file type
  • test/src/main/resources/db/7.1/referentiel.sql.gz
    No preview for this file type