View Javadoc
1   package fr.ifremer.dali.ui.swing.content.observation.survey.history;
2   
3   /*-
4    * #%L
5    * Dali :: UI
6    * %%
7    * Copyright (C) 2014 - 2017 Ifremer
8    * %%
9    * This program is free software: you can redistribute it and/or modify
10   * it under the terms of the GNU Affero General Public License as published by
11   * the Free Software Foundation, either version 3 of the License, or
12   * (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 Affero General Public License
20   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21   * #L%
22   */
23  
24  import fr.ifremer.dali.dto.DaliBeanFactory;
25  import fr.ifremer.dali.dto.referential.PersonDTO;
26  import fr.ifremer.dali.dto.referential.QualityLevelDTO;
27  import fr.ifremer.dali.dto.system.QualificationHistoryDTO;
28  import fr.ifremer.dali.ui.swing.util.table.AbstractDaliRowUIModel;
29  import org.nuiton.util.beans.Binder;
30  import org.nuiton.util.beans.BinderFactory;
31  
32  import java.util.Date;
33  
34  /**
35   * @author peck7 on 26/09/2017.
36   */
37  public class QualificationHistoryRowModel extends AbstractDaliRowUIModel<QualificationHistoryDTO, QualificationHistoryRowModel> implements QualificationHistoryDTO {
38  
39      private static final Binder<QualificationHistoryDTO, QualificationHistoryRowModel> FROM_BEAN_BINDER =
40              BinderFactory.newBinder(QualificationHistoryDTO.class, QualificationHistoryRowModel.class);
41      private static final Binder<QualificationHistoryRowModel, QualificationHistoryDTO> TO_BEAN_BINDER =
42              BinderFactory.newBinder(QualificationHistoryRowModel.class, QualificationHistoryDTO.class);
43  
44      public QualificationHistoryRowModel() {
45          super(FROM_BEAN_BINDER, TO_BEAN_BINDER);
46      }
47  
48      @Override
49      protected QualificationHistoryDTO newBean() {
50          return DaliBeanFactory.newQualificationHistoryDTO();
51      }
52  
53      @Override
54      public Date getDate() {
55          return delegateObject.getDate();
56      }
57  
58      @Override
59      public void setDate(Date date) {
60          delegateObject.setDate(date);
61      }
62  
63      @Override
64      public String getComment() {
65          return delegateObject.getComment();
66      }
67  
68      @Override
69      public void setComment(String comment) {
70          delegateObject.setComment(comment);
71      }
72  
73      @Override
74      public PersonDTO getRecorderPerson() {
75          return delegateObject.getRecorderPerson();
76      }
77  
78      @Override
79      public void setRecorderPerson(PersonDTO recorderPerson) {
80          delegateObject.setRecorderPerson(recorderPerson);
81      }
82  
83      @Override
84      public QualityLevelDTO getQualityLevel() {
85          return delegateObject.getQualityLevel();
86      }
87  
88      @Override
89      public void setQualityLevel(QualityLevelDTO qualityLevel) {
90          delegateObject.setQualityLevel(qualityLevel);
91      }
92  }