View Javadoc
1   // license-header java merge-point
2   //
3   // Attention: Generated code! Do not modify by hand!
4   // Generated by: hibernate/HibernateEntityPK.vsl in andromda-hibernate-cartridge.
5   //
6   package fr.ifremer.quadrige3.core.dao.referential.pmfm;
7   
8   /*-
9    * #%L
10   * Quadrige3 Core :: Client API
11   * %%
12   * Copyright (C) 2017 - 2024 Ifremer
13   * %%
14   * This program is free software: you can redistribute it and/or modify
15   * it under the terms of the GNU Affero General Public License as published by
16   * the Free Software Foundation, either version 3 of the License, or
17   * (at your option) any later version.
18   * 
19   * This program is distributed in the hope that it will be useful,
20   * but WITHOUT ANY WARRANTY; without even the implied warranty of
21   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22   * GNU General Public License for more details.
23   * 
24   * You should have received a copy of the GNU Affero General Public License
25   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
26   * #L%
27   */
28  import java.io.Serializable;
29  import org.apache.commons.lang3.builder.EqualsBuilder;
30  import org.apache.commons.lang3.builder.HashCodeBuilder;
31  
32  /**
33   * Primary key class for PmfmQualValue
34   */
35  public class PmfmQualValuePK implements Serializable, Comparable<PmfmQualValuePK>
36  {
37      /**
38       * The serial version UID of this class. Needed for serialization.
39       */
40      private static final long serialVersionUID = -6004491336635439074L;
41  
42      public PmfmQualValuePK()
43      {
44      }
45  
46      public PmfmQualValuePK(QualitativeValueImpl qualitativeValue, PmfmImpl pmfm)
47      {
48          this.qualitativeValue = qualitativeValue;
49          this.pmfm = pmfm;
50      }
51  
52      private QualitativeValueImpl qualitativeValue;
53  
54      public QualitativeValueImpl getQualitativeValue()
55      {
56          return this.qualitativeValue;
57      }
58  
59      public void setQualitativeValue(QualitativeValueImpl qualitativeValue)
60      {
61          this.qualitativeValue = qualitativeValue;
62      }
63  
64      private PmfmImpl pmfm;
65  
66      public PmfmImpl getPmfm()
67      {
68          return this.pmfm;
69      }
70  
71      public void setPmfm(PmfmImpl pmfm)
72      {
73          this.pmfm = pmfm;
74      }
75  
76      @Override
77      public boolean equals(Object object)
78      {
79          if (this == object)
80          {
81              return true;
82          }
83          if (!(object instanceof PmfmQualValuePK))
84          {
85              return false;
86          }
87          final PmfmQualValuePK that = (PmfmQualValuePK)object;
88          return new EqualsBuilder()
89              .append(this.getQualitativeValue(),that.getQualitativeValue())
90              .append(this.getPmfm(),that.getPmfm())
91              .isEquals();
92      }
93  
94      @Override
95      public int hashCode()
96      {
97          return new HashCodeBuilder()
98              .append(getQualitativeValue())
99              .append(getPmfm())
100             .toHashCode();
101     }
102 
103     /**
104      * @see Comparable#compareTo
105      */
106     @Override
107     public int compareTo(PmfmQualValuePK o)
108     {
109         int cmp = 0;
110         return cmp;
111     }
112 }