View Javadoc
1   /*
2    * #%L
3    * Tutti :: Service
4    * %%
5    * Copyright (C) 2012 - 2014 Ifremer
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  package fr.ifremer.tutti.service.protocol;
23  
24  import fr.ifremer.tutti.persistence.entities.protocol.CaracteristicType;
25  import fr.ifremer.tutti.persistence.entities.referential.Caracteristic;
26  
27  import java.io.Serializable;
28  import java.util.LinkedHashSet;
29  import java.util.Set;
30  
31  /**
32   * Bean used as a row for import of {@link Caracteristic}.
33   *
34   * @author Tony Chemit - chemit@codelutin.com
35   * @since 0.3
36   */
37  public class CaracteristicRow implements Serializable {
38  
39      private static final long serialVersionUID = 1L;
40  
41      public static final String PROPERTY_PMFM_ID = "pmfmId";
42  
43      public static final String PROPERTY_PMFM_TYPE = "pmfmType";
44  
45      public static final String PROPERTY_PMFM_PARAMETER_NAME = "pmfmParameterName";
46  
47      public static final String PROPERTY_PMFM_MATRIX_NAME = "pmfmMatrixName";
48  
49      public static final String PROPERTY_PMFM_FRACTION_NAME = "pmfmFractionName";
50  
51      public static final String PROPERTY_PMFM_METHOD_NAME = "pmfmMethodName";
52  
53      public static final String PROPERTY_PMFM = "pmfm";
54  
55      public static final String PROPERTY_MATURE_STATE_IDS = "matureStateIds";;
56  
57      protected CaracteristicType pmfmType;
58  
59      protected Caracteristic pmfm;
60  
61      protected Set<String> matureStateIds = new LinkedHashSet<>();
62  
63      public Caracteristic getPmfm() {
64          return pmfm;
65      }
66  
67      public void setPmfm(Caracteristic pmfm) {
68          this.pmfm = pmfm;
69      }
70  
71      public CaracteristicType getPmfmType() {
72          return pmfmType;
73      }
74  
75      public void setPmfmType(CaracteristicType pmfmType) {
76          this.pmfmType = pmfmType;
77      }
78  
79      public String getPmfmId() {
80          return getPmfm().getId();
81      }
82  
83      public String getPmfmParameterName() {
84          return getPmfm().getParameterName();
85      }
86  
87      public String getPmfmMatrixName() {
88          return getPmfm().getMatrixName();
89      }
90  
91      public String getPmfmMethodName() {
92          return getPmfm().getMethodName();
93      }
94  
95      public String getPmfmFractionName() {
96          return getPmfm().getFractionName();
97      }
98  
99      public Set<String> getMatureStateIds() {
100         return matureStateIds;
101     }
102 
103     public void setMatureStateIds(Set<String> matureStateIds) {
104         this.matureStateIds = matureStateIds;
105     }
106 }