View Javadoc
1   package fr.ifremer.reefdb.ui.swing.content.observation.shared;
2   
3   /*-
4    * #%L
5    * Reef DB :: UI
6    * $Id:$
7    * $HeadURL:$
8    * %%
9    * Copyright (C) 2014 - 2019 Ifremer
10   * %%
11   * This program is free software: you can redistribute it and/or modify
12   * it under the terms of the GNU Affero General Public License as published by
13   * the Free Software Foundation, either version 3 of the License, or
14   * (at your option) any later version.
15   *
16   * This program is distributed in the hope that it will be useful,
17   * but WITHOUT ANY WARRANTY; without even the implied warranty of
18   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19   * GNU General Public License for more details.
20   *
21   * You should have received a copy of the GNU Affero General Public License
22   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
23   * #L%
24   */
25  
26  import fr.ifremer.reefdb.dto.data.measurement.MeasurementDTO;
27  import fr.ifremer.reefdb.dto.referential.DepartmentDTO;
28  import fr.ifremer.reefdb.ui.swing.util.table.AbstractReefDbTableModel;
29  import fr.ifremer.reefdb.ui.swing.util.table.ReefDbColumnIdentifier;
30  import org.jdesktop.swingx.table.TableColumnModelExt;
31  
32  import static org.nuiton.i18n.I18n.n;
33  
34  /**
35   * @author peck7 on 08/01/2019.
36   */
37  public abstract class AbstractMeasurementsGroupedTableModel<R extends AbstractMeasurementsGroupedRowModel<MeasurementDTO, ?>>
38      extends AbstractReefDbTableModel<R> {
39  
40      /**
41       * Identifiant pour la colonne analyst.
42       */
43      public static final ReefDbColumnIdentifier<? extends AbstractMeasurementsGroupedRowModel<MeasurementDTO, ?>> ANALYST = ReefDbColumnIdentifier.newId(
44          AbstractMeasurementsGroupedRowModel.PROPERTY_ANALYST,
45          n("reefdb.property.analyst"),
46          n("reefdb.measurement.analyst.tip"),
47          DepartmentDTO.class);
48  
49      public static final ReefDbColumnIdentifier<? extends AbstractMeasurementsGroupedRowModel<MeasurementDTO, ?>> INDIVIDUAL_ID = ReefDbColumnIdentifier.newReadOnlyId(
50          AbstractMeasurementsGroupedRowModel.PROPERTY_INDIVIDUAL_ID,
51          n("reefdb.property.individualId"),
52          n("reefdb.property.individualId"),
53          Integer.class);
54  
55      /**
56       * <p>Constructor for AbstractReefDbTableModel.</p>
57       *
58       * @param columnModel a {@link TableColumnModelExt} object.
59       */
60      public AbstractMeasurementsGroupedTableModel(TableColumnModelExt columnModel, boolean createNewRow) {
61          super(columnModel, createNewRow, false);
62      }
63  
64      public abstract ReefDbColumnIdentifier<R> getPmfmInsertPosition();
65  }