Commit b950c370 authored by PECQUOT's avatar PECQUOT

[fix] Cache rebuild after a referential import is now performed correctly (Mantis #49361)

[fix] Default analyst is now set after grid initialization (Mantis #49331)
[fix] Detection of perfect duplicates in grid algorithm reworked for performance (Mantis #50040)
[enh] Grid initialization is now capable to resume a previous initialization (Mantis #50045)
Signed-off-by: PECQUOT's avatarlp1ee9d <ludovic.pecquot@e-is.pro>
parent e4878826
## Sprint 79 - v3.8.0
- Une mise à jour de la base de données cliente HsqlDb s'exécutera au démarrage de l'application
## Sprint 78 - v3.7.5
- Pas de mise à jour de modèle
......
......@@ -171,7 +171,7 @@
<maven.compiler.debug>true</maven.compiler.debug>
<!-- Quadrige3 Core version -->
<quadrige3-core.version>3.6.0-SNAPSHOT</quadrige3-core.version>
<quadrige3-core.version>3.6.2</quadrige3-core.version>
<!-- Last ReefDb launcher version -->
<launcherVersion>3.0.3</launcherVersion>
......
......@@ -555,7 +555,7 @@ public class ReefDbTaxonNameDaoImpl extends TaxonNameDaoImpl implements ReefDbTa
String levelCode = (String) source.next();
String levelLabel = (String) source.next();
String levelName = (String) source.next();
Double levelNb = (Double) source.next();
Integer levelNb = (Integer) source.next();
Integer citationId = (Integer) source.next();
String citationName = (String) source.next();
......@@ -638,7 +638,7 @@ public class ReefDbTaxonNameDaoImpl extends TaxonNameDaoImpl implements ReefDbTa
result.setName((String) source.next());
//number
result.setNumber((Double) source.next());
result.setNumber((Integer) source.next());
return result;
......
......@@ -451,6 +451,26 @@ public class ReefDbBeans extends QuadrigeBeans {
return measurement == null || (measurement.getNumericalValue() == null && measurement.getQualitativeValue() == null);
}
public static Set<Integer> getPmfmIdsOfNonEmptyMeasurements(MeasurementAware bean) {
if (CollectionUtils.isNotEmpty(bean.getMeasurements())) {
return bean.getMeasurements().stream()
.filter(measurement -> !isMeasurementEmpty(measurement))
.map(measurement -> measurement.getPmfm().getId())
.collect(Collectors.toSet());
}
return new HashSet<>();
}
public static Set<Integer> getPmfmIdsOfNonEmptyIndividualMeasurements(MeasurementAware bean) {
if (CollectionUtils.isNotEmpty(bean.getIndividualMeasurements())) {
return bean.getIndividualMeasurements().stream()
.filter(measurement -> !isMeasurementEmpty(measurement))
.map(measurement -> measurement.getPmfm().getId())
.collect(Collectors.toSet());
}
return new HashSet<>();
}
public static final String PROPERTY_PMFM_ID = MeasurementDTO.PROPERTY_PMFM + '.' + PmfmDTO.PROPERTY_ID;
public static MeasurementDTO getMeasurementByPmfmId(MeasurementAware bean, int pmfmId) {
......@@ -467,6 +487,13 @@ public class ReefDbBeans extends QuadrigeBeans {
return null;
}
public static List<MeasurementDTO> getIndividualMeasurementsByPmfmId(MeasurementAware bean, int pmfmId) {
if (CollectionUtils.isNotEmpty(bean.getIndividualMeasurements())) {
return filterCollection(bean.getIndividualMeasurements(), measurement -> measurement.getPmfm().getId() == pmfmId);
}
return new ArrayList<>();
}
public static boolean haveSameMeasurements(Collection<MeasurementDTO> measurements, Collection<MeasurementDTO> otherMeasurements) {
List<Integer> pmfmIds = measurements.stream()
.filter(measurement -> !isMeasurementEmpty(measurement))
......
......@@ -221,7 +221,7 @@ public class PersistenceServiceImpl implements PersistenceService {
@Override
public void enableMassiveUpdate() {
if (!Daos.isFileDatabase(config.getJdbcUrl())) return;
if (!Daos.isHsqlFileDatabase(config.getJdbcUrl())) return;
if (LOG.isDebugEnabled()) {
LOG.debug("Enable massive update behavior [CHECKPOINT first]");
......@@ -242,7 +242,7 @@ public class PersistenceServiceImpl implements PersistenceService {
@Override
public void disableMassiveUpdate() {
if (!Daos.isFileDatabase(config.getJdbcUrl())) return;
if (!Daos.isHsqlFileDatabase(config.getJdbcUrl())) return;
if (LOG.isDebugEnabled()) {
LOG.debug("Disable massive update behavior [CHECKPOINT first]");
......@@ -315,7 +315,7 @@ public class PersistenceServiceImpl implements PersistenceService {
*/
private void shutdownDatabase() {
// Do not shutdown if database run as server
if (!Daos.isFileDatabase(config.getJdbcUrl())) {
if (!Daos.isHsqlFileDatabase(config.getJdbcUrl())) {
return;
}
......
......@@ -550,7 +550,7 @@ public class ReefDbUIContext extends ApplicationUIContext implements JAXXHelpUIH
// clear caches if forced OR if a post import action is needed
if (clearCache || isDbJustInstalled() || isDbJustImportedFromFile()) {
clearAllCaches();
clearCaches();
}
// Try to re authenticate
......@@ -605,43 +605,12 @@ public class ReefDbUIContext extends ApplicationUIContext implements JAXXHelpUIH
/**
* Clear all caches
*/
public void clearAllCaches() {
if (isPersistenceLoaded()) {
// clear DB cache
getPersistenceService().clearAllCaches();
// clear local cache
dataContext.resetLocalCache();
}
}
/**
* <p>reloadDbCache.</p>
*
* @param progressionModel a {@link ProgressionUIModel} object.
*/
public void reloadDbCache(ProgressionUIModel progressionModel) {
if (isPersistenceLoaded() && !isDbJustInstalled()) {
// save previous progression model state
int total = progressionModel.getTotal();
int current = progressionModel.getCurrent();
String message = progressionModel.getMessage();
// Clear first
clearAllCaches();
// reload all needed caches
getPersistenceService().loadDefaultCaches(progressionModel);
@Override
public void clearCaches() {
super.clearCaches();
// restore progression model
progressionModel.setTotal(total);
progressionModel.setCurrent(current);
progressionModel.setMessage(message);
}
// clear local cache also
dataContext.resetLocalCache();
}
/**
......
......@@ -24,7 +24,7 @@ package fr.ifremer.reefdb.ui.swing.content.observation.operation.measurement.gro
*/
import com.google.common.collect.Lists;
import fr.ifremer.quadrige3.ui.core.dto.QuadrigeBean;
import fr.ifremer.reefdb.dto.data.measurement.MeasurementDTO;
import fr.ifremer.reefdb.dto.data.sampling.SamplingOperationAware;
import fr.ifremer.reefdb.dto.data.sampling.SamplingOperationDTO;
import fr.ifremer.reefdb.ui.swing.content.observation.shared.AbstractMeasurementsGroupedRowModel;
......@@ -35,7 +35,8 @@ import java.util.Objects;
/**
* <p>OperationMeasurementsGroupedRowModel class.</p>
*/
public class OperationMeasurementsGroupedRowModel extends AbstractMeasurementsGroupedRowModel<QuadrigeBean, OperationMeasurementsGroupedRowModel>
public class OperationMeasurementsGroupedRowModel
extends AbstractMeasurementsGroupedRowModel<MeasurementDTO, OperationMeasurementsGroupedRowModel>
implements SamplingOperationAware {
/**
......@@ -74,13 +75,18 @@ public class OperationMeasurementsGroupedRowModel extends AbstractMeasurementsGr
}
@Override
public boolean isSameRow(AbstractMeasurementsGroupedRowModel that) {
public boolean isSameRow(AbstractMeasurementsGroupedRowModel<?, ?> that) {
if (!(that instanceof OperationMeasurementsGroupedRowModel)) return false;
return Objects.equals(this.getSamplingOperation(), ((OperationMeasurementsGroupedRowModel) that).getSamplingOperation()) && super.isSameRow(that);
}
@Override
public List<String> getDefaultProperties() {
return Lists.newArrayList(PROPERTY_SAMPLING_OPERATION, PROPERTY_TAXON_GROUP, PROPERTY_TAXON);
}
@Override
public String rowWithMeasurementsHashCode() {
return String.valueOf(getSamplingOperation() != null ? getSamplingOperation().getName() : null) + '|' + super.rowWithMeasurementsHashCode();
}
}
......@@ -36,7 +36,8 @@ import java.util.Objects;
/**
* Modele pour les mesures des prelevements (ecran prelevements/mesure).
*/
public class OperationMeasurementsGroupedTableUIModel extends AbstractMeasurementsGroupedTableUIModel<MeasurementDTO, OperationMeasurementsGroupedRowModel, OperationMeasurementsGroupedTableUIModel> {
public class OperationMeasurementsGroupedTableUIModel
extends AbstractMeasurementsGroupedTableUIModel<MeasurementDTO, OperationMeasurementsGroupedRowModel, OperationMeasurementsGroupedTableUIModel> {
/**
* Constant <code>PROPERTY_SAMPLING_OPERATION="samplingOperation"</code>
......@@ -87,7 +88,8 @@ public class OperationMeasurementsGroupedTableUIModel extends AbstractMeasuremen
getTransectOriginPmfmId() != null
&& getTransectLengthPmfmId() != null
&&*/ getTransitionLengthPmfmId() != null
&& !getSamplingOperationsWithoutMeasurement().isEmpty();
/* Mantis #50045: the grid initialisation is enabled even if there are measurements already inside
&& !getSamplingOperationsWithoutMeasurement().isEmpty()*/;
}
public List<SamplingOperationDTO> getSamplingOperationsWithoutMeasurement() {
......
......@@ -23,9 +23,11 @@ package fr.ifremer.reefdb.ui.swing.content.observation.operation.measurement.gro
* #L%
*/
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
import fr.ifremer.quadrige3.ui.swing.model.AbstractEmptyUIModel;
import fr.ifremer.reefdb.dto.data.sampling.SamplingOperationDTO;
import fr.ifremer.reefdb.dto.referential.UnitDTO;
import fr.ifremer.quadrige3.ui.swing.model.AbstractEmptyUIModel;
import java.util.List;
......@@ -40,6 +42,8 @@ public class InitGridUIModel extends AbstractEmptyUIModel<InitGridUIModel> {
private SamplingOperationDTO samplingOperation;
public static final String PROPERTY_SAMPLING_OPERATION = "samplingOperation";
private SamplingOperationDTO lastSamplingOperation;
private boolean allSamplingOperations;
public static final String PROPERTY_ALL_SAMPLING_OPERATIONS = "allSamplingOperations";
......@@ -64,6 +68,18 @@ public class InitGridUIModel extends AbstractEmptyUIModel<InitGridUIModel> {
private UnitDTO transitionUnit;
public static final String PROPERTY_TRANSITION_UNIT = "transitionUnit";
// map of result
private Multimap<SamplingOperationDTO, Integer> resultMap = ArrayListMultimap.create();
private Multimap<SamplingOperationDTO, Integer> currentMap = ArrayListMultimap.create();
public Multimap<SamplingOperationDTO, Integer> getResultMap() {
return resultMap;
}
public Multimap<SamplingOperationDTO, Integer> getCurrentMap() {
return currentMap;
}
public List<SamplingOperationDTO> getSamplingOperations() {
return samplingOperations;
}
......@@ -105,6 +121,14 @@ public class InitGridUIModel extends AbstractEmptyUIModel<InitGridUIModel> {
firePropertyChange(PROPERTY_SAMPLING_OPERATION, oldValue, samplingOperation);
}
public SamplingOperationDTO getLastSamplingOperation() {
return lastSamplingOperation;
}
public void setLastSamplingOperation(SamplingOperationDTO lastSamplingOperation) {
this.lastSamplingOperation = lastSamplingOperation;
}
public Integer getOrigin() {
return origin;
}
......
......@@ -12,12 +12,12 @@ package fr.ifremer.reefdb.ui.swing.content.observation.shared;
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* #L%
......@@ -29,6 +29,7 @@ import fr.ifremer.quadrige3.ui.core.dto.CommentAware;
import fr.ifremer.quadrige3.ui.core.dto.QuadrigeBean;
import fr.ifremer.reefdb.dto.ErrorAware;
import fr.ifremer.reefdb.dto.ErrorDTO;
import fr.ifremer.reefdb.dto.ReefDbBeans;
import fr.ifremer.reefdb.dto.data.measurement.MeasurementAware;
import fr.ifremer.reefdb.dto.data.measurement.MeasurementDTO;
import fr.ifremer.reefdb.dto.referential.DepartmentDTO;
......@@ -38,30 +39,26 @@ import fr.ifremer.reefdb.dto.referential.pmfm.PmfmDTO;
import fr.ifremer.reefdb.ui.swing.util.table.AbstractReefDbRowUIModel;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import java.util.Objects;
import java.util.function.Predicate;
import java.util.stream.Collectors;
/**
* @author peck7 on 08/01/2019.
*/
public abstract class AbstractMeasurementsGroupedRowModel<B extends QuadrigeBean, M extends AbstractMeasurementsGroupedRowModel<B, M>>
extends AbstractReefDbRowUIModel<B, M> implements CommentAware, MeasurementAware, ErrorAware {
public abstract class AbstractMeasurementsGroupedRowModel<B extends QuadrigeBean, R extends AbstractMeasurementsGroupedRowModel<B, R>>
extends AbstractReefDbRowUIModel<B, R> implements CommentAware, MeasurementAware, ErrorAware {
/** Constant <code>PROPERTY_TAXON="taxon"</code> */
public static String PROPERTY_INDIVIDUAL_ID = "individualId";
public static String PROPERTY_TAXON = "taxon";
/** Constant <code>PROPERTY_INPUT_TAXON_ID="inputTaxonId"</code> */
public static String PROPERTY_INPUT_TAXON_ID = "inputTaxonId";
/** Constant <code>PROPERTY_INPUT_TAXON_NAME="inputTaxonNAme"</code> */
public static String PROPERTY_INPUT_TAXON_NAME = "inputTaxonName";
/** Constant <code>PROPERTY_TAXON_GROUP="taxonGroup"</code> */
public static String PROPERTY_TAXON_GROUP = "taxonGroup";
/** Constant <code>PROPERTY_COMMENT="comment"</code> */
public static String PROPERTY_COMMENT = "comment";
/** Constant <code>PROPERTY_ANALYST="analyst"</code> */
public static String PROPERTY_ANALYST = "analyst";
/** Constant <code>PROPERTY_INDIVIDUAL_PMFMS="individualPmfms"</code> */
public static String PROPERTY_INDIVIDUAL_PMFMS = "individualPmfms";
/** Constant <code>PROPERTY_INDIVIDUAL_MEASUREMENTS="individualMeasurements"</code> */
public static String PROPERTY_INDIVIDUAL_MEASUREMENTS = "individualMeasurements";
private Integer individualId;
......@@ -82,7 +79,6 @@ public abstract class AbstractMeasurementsGroupedRowModel<B extends QuadrigeBean
/**
* <p>Constructor for AbstractReefDbRowUIModel.</p>
*
*/
public AbstractMeasurementsGroupedRowModel(boolean readOnly) {
super(null, null);
......@@ -93,13 +89,17 @@ public abstract class AbstractMeasurementsGroupedRowModel<B extends QuadrigeBean
this.readOnly = readOnly;
}
/** {@inheritDoc} */
/**
* {@inheritDoc}
*/
@Override
public boolean isEditable() {
return !readOnly && super.isEditable();
}
/** {@inheritDoc} */
/**
* {@inheritDoc}
*/
@Override
protected B newBean() {
return null;
......@@ -183,13 +183,17 @@ public abstract class AbstractMeasurementsGroupedRowModel<B extends QuadrigeBean
firePropertyChange(PROPERTY_INPUT_TAXON_NAME, oldValue, inputTaxonName);
}
/** {@inheritDoc} */
/**
* {@inheritDoc}
*/
@Override
public String getComment() {
return comment;
}
/** {@inheritDoc} */
/**
* {@inheritDoc}
*/
@Override
public void setComment(String comment) {
String oldValue = this.comment;
......@@ -217,19 +221,25 @@ public abstract class AbstractMeasurementsGroupedRowModel<B extends QuadrigeBean
firePropertyChange(PROPERTY_ANALYST, oldValue, analyst);
}
/** {@inheritDoc} */
/**
* {@inheritDoc}
*/
@Override
public List<PmfmDTO> getPmfms() {
return getIndividualPmfms();
}
/** {@inheritDoc} */
/**
* {@inheritDoc}
*/
@Override
public List<MeasurementDTO> getMeasurements() {
return getIndividualMeasurements();
}
/** {@inheritDoc} */
/**
* {@inheritDoc}
*/
@Override
public List<PmfmDTO> getIndividualPmfms() {
return individualPmfms;
......@@ -246,7 +256,9 @@ public abstract class AbstractMeasurementsGroupedRowModel<B extends QuadrigeBean
firePropertyChange(PROPERTY_INDIVIDUAL_PMFMS, oldValue, individualPmfms);
}
/** {@inheritDoc} */
/**
* {@inheritDoc}
*/
@Override
public List<MeasurementDTO> getIndividualMeasurements() {
return individualMeasurements;
......@@ -267,7 +279,9 @@ public abstract class AbstractMeasurementsGroupedRowModel<B extends QuadrigeBean
return allowedQualitativeValuesMap;
}
/** {@inheritDoc} */
/**
* {@inheritDoc}
*/
@Override
public Collection<ErrorDTO> getErrors() {
return errors;
......@@ -277,12 +291,57 @@ public abstract class AbstractMeasurementsGroupedRowModel<B extends QuadrigeBean
return preconditionErrors;
}
public boolean isSameRow(AbstractMeasurementsGroupedRowModel that) {
public boolean isSameRow(AbstractMeasurementsGroupedRowModel<?, ?> that) {
return Objects.equals(this.getTaxonGroup(), that.getTaxonGroup())
&& Objects.equals(this.getTaxon(), that.getTaxon());
&& Objects.equals(this.getTaxon(), that.getTaxon());
}
public List<String> getDefaultProperties() {
return Lists.newArrayList(PROPERTY_TAXON_GROUP, PROPERTY_TAXON);
}
/**
* Return a unique hashCode for the row
*
* @return hashCode
*/
public String rowWithMeasurementsHashCode() {
return rowWithMeasurementsHashCode(x -> true);
}
/**
* Return a unique hashCode for the row
*
* @return hashCode
*/
public String rowWithMeasurementsHashCode(Collection<PmfmDTO> filterPmfms) {
return rowWithMeasurementsHashCode(measurement -> filterPmfms.contains(measurement.getPmfm()));
}
/**
* Return a unique hashCode for the row with specified filter
*
* @return hashCode
*/
private String rowWithMeasurementsHashCode(Predicate<MeasurementDTO> filterPredicate) {
StringBuilder sb = new StringBuilder();
sb.append(getTaxonGroup() != null ? getTaxonGroup().getId() : null).append('|');
sb.append(getTaxon() != null ? getTaxon().getId() : null).append('|');
if (getIndividualMeasurements() != null) {
sb.append(
getIndividualMeasurements().stream()
.filter(filterPredicate)
.filter(measurement -> !ReefDbBeans.isMeasurementEmpty(measurement))
.sorted(Comparator.comparing(o -> o.getPmfm().getId()))
.map(measurement -> measurement.getPmfm().getId().toString() + ':' +
(measurement.getPmfm().getParameter().isQualitative()
? String.valueOf(measurement.getQualitativeValue() != null ? measurement.getQualitativeValue().getId() : null)
: String.valueOf(measurement.getNumericalValue())))
.collect(Collectors.joining("|"))
);
} else {
sb.append('N');
}
return sb.toString();
}
}
......@@ -12,12 +12,12 @@ package fr.ifremer.reefdb.ui.swing.content.observation.shared;
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* #L%
......@@ -40,15 +40,21 @@ public abstract class AbstractMeasurementsGroupedTableModel<R extends AbstractMe
* Identifiant pour la colonne analyst.
*/
public static final ReefDbColumnIdentifier<? extends AbstractMeasurementsGroupedRowModel> ANALYST = ReefDbColumnIdentifier.newId(
AbstractMeasurementsGroupedRowModel.PROPERTY_ANALYST,
n("reefdb.property.analyst"),
n("reefdb.measurement.analyst.tip"),
DepartmentDTO.class);
AbstractMeasurementsGroupedRowModel.PROPERTY_ANALYST,
n("reefdb.property.analyst"),
n("reefdb.measurement.analyst.tip"),
DepartmentDTO.class);
public static final ReefDbColumnIdentifier<? extends AbstractMeasurementsGroupedRowModel> INDIVIDUAL_ID = ReefDbColumnIdentifier.newReadOnlyId(
AbstractMeasurementsGroupedRowModel.PROPERTY_INDIVIDUAL_ID,
n("reefdb.property.individualId"),
n("reefdb.property.individualId"),
Integer.class);
/**
* <p>Constructor for AbstractReefDbTableModel.</p>
*
* @param columnModel a {@link TableColumnModelExt} object.
* @param columnModel a {@link TableColumnModelExt} object.
*/
public AbstractMeasurementsGroupedTableModel(TableColumnModelExt columnModel) {
super(columnModel, true, false);
......
......@@ -12,12 +12,12 @@ package fr.ifremer.reefdb.ui.swing.content.observation.shared;
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* #L%
......@@ -45,7 +45,10 @@ import java.util.Map;
/**
* @author peck7 on 08/01/2019.
*/
public abstract class AbstractMeasurementsGroupedTableUIModel<B extends QuadrigeBean, R extends AbstractMeasurementsGroupedRowModel, M extends AbstractMeasurementsGroupedTableUIModel<B, R, M>>
public abstract class AbstractMeasurementsGroupedTableUIModel<
B extends QuadrigeBean,
R extends AbstractMeasurementsGroupedRowModel<B, R>,
M extends AbstractMeasurementsGroupedTableUIModel<B, R, M>>
extends AbstractReefDbTableUIModel<B, R, M> {
public static final String PROPERTY_SURVEY = "survey";
......@@ -62,7 +65,7 @@ public abstract class AbstractMeasurementsGroupedTableUIModel<B extends Quadrige
// map holding preconditions per pmfm id
private Multimap<Integer, PreconditionRuleDTO> preconditionRulesByPmfmIdMap;
// map holding groups per pmfm id
private Multimap<ControlRuleDTO, Map.Entry<RuleGroupDTO, ReefDbColumnIdentifier<R>>> identifiersByGroupedRuleMap;
private Multimap<ControlRuleDTO, Map.Entry<RuleGroupDTO, ? extends ReefDbColumnIdentifier<R>>> identifiersByGroupedRuleMap;
private boolean adjusting;
/**
......@@ -147,7 +150,6 @@ public abstract class AbstractMeasurementsGroupedTableUIModel<B extends Quadrige
return measurementFilter == null ? null : measurementFilter.getSamplingOperation();
}
public Multimap<Integer, PreconditionRuleDTO> getPreconditionRulesByPmfmIdMap() {
if (preconditionRulesByPmfmIdMap == null) preconditionRulesByPmfmIdMap = ArrayListMultimap.create();
return preconditionRulesByPmfmIdMap;
......@@ -165,13 +167,13 @@ public abstract class AbstractMeasurementsGroupedTableUIModel<B extends Quadrige
return getPreconditionRulesByPmfmIdMap().get(pmfmId);
}
public Multimap<ControlRuleDTO, Map.Entry<RuleGroupDTO, ReefDbColumnIdentifier<R>>> getIdentifiersByGroupedRuleMap() {
public Multimap<ControlRuleDTO, Map.Entry<RuleGroupDTO, ? extends ReefDbColumnIdentifier<R>>> getIdentifiersByGroupedRuleMap() {
if (identifiersByGroupedRuleMap == null) identifiersByGroupedRuleMap = ArrayListMultimap.create();
return identifiersByGroupedRuleMap;
}
public ReefDbColumnIdentifier<R> getIdentifierByGroup(RuleGroupDTO group) {
for (Map.Entry<RuleGroupDTO, ReefDbColumnIdentifier<R>> identifierByGroup: getIdentifiersByGroupedRuleMap().values()) {
for (Map.Entry<RuleGroupDTO, ? extends ReefDbColumnIdentifier<R>> identifierByGroup : getIdentifiersByGroupedRuleMap().values()) {
if (identifierByGroup.getKey().equals(group))
return identifierByGroup.getValue();
}
......
......@@ -23,13 +23,13 @@ package fr.ifremer.reefdb.ui.swing.content.observation.survey.measurement.groupe
* #L%
*/
import fr.ifremer.quadrige3.ui.core.dto.QuadrigeBean;
import fr.ifremer.reefdb.dto.data.measurement.MeasurementDTO;
import fr.ifremer.reefdb.ui.swing.content.observation.shared.AbstractMeasurementsGroupedRowModel;
/**
* <p>SurveyMeasurementsGroupedRowModel class.</p>
*/
public class SurveyMeasurementsGroupedRowModel extends AbstractMeasurementsGroupedRowModel<QuadrigeBean, SurveyMeasurementsGroupedRowModel> {