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.quadrige2.core.dao.system.context;
7   
8   /*-
9    * #%L
10   * Quadrige2 Core :: Server API
11   * %%
12   * Copyright (C) 2017 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  
29  import fr.ifremer.quadrige2.core.dao.referential.pmfm.PmfmImpl;
30  import java.io.Serializable;
31  import org.apache.commons.lang3.builder.EqualsBuilder;
32  import org.apache.commons.lang3.builder.HashCodeBuilder;
33  
34  /**
35   * Primary key class for PmfmContextOrder
36   */
37  public class PmfmContextOrderPK implements Serializable, Comparable<PmfmContextOrderPK>
38  {
39      /**
40       * The serial version UID of this class. Needed for serialization.
41       */
42      private static final long serialVersionUID = 5170093576577811409L;
43  
44      public PmfmContextOrderPK()
45      {
46      }
47  
48      public PmfmContextOrderPK(ContextImpl context, PmfmImpl pmfm)
49      {
50          this.context = context;
51          this.pmfm = pmfm;
52      }
53  
54      private ContextImpl context;
55  
56      public ContextImpl getContext()
57      {
58          return this.context;
59      }
60  
61      public void setContext(ContextImpl context)
62      {
63          this.context = context;
64      }
65  
66      private PmfmImpl pmfm;
67  
68      public PmfmImpl getPmfm()
69      {
70          return this.pmfm;
71      }
72  
73      public void setPmfm(PmfmImpl pmfm)
74      {
75          this.pmfm = pmfm;
76      }
77  
78      @Override
79      public boolean equals(Object object)
80      {
81          if (this == object)
82          {
83              return true;
84          }
85          if (!(object instanceof PmfmContextOrderPK))
86          {
87              return false;
88          }
89          final PmfmContextOrderPK that = (PmfmContextOrderPK)object;
90          return new EqualsBuilder()
91              .append(this.getContext(),that.getContext())
92              .append(this.getPmfm(),that.getPmfm())
93              .isEquals();
94      }
95  
96      @Override
97      public int hashCode()
98      {
99          return new HashCodeBuilder()
100             .append(getContext())
101             .append(getPmfm())
102             .toHashCode();
103     }
104 
105     /**
106      * @see Comparable#compareTo
107      */
108     @Override
109     public int compareTo(PmfmContextOrderPK o)
110     {
111         int cmp = 0;
112         return cmp;
113     }
114 }