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.administration.program;
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 fr.ifremer.quadrige3.core.dao.administration.user.QuserImpl;
29  import java.io.Serializable;
30  import org.apache.commons.lang3.builder.EqualsBuilder;
31  import org.apache.commons.lang3.builder.HashCodeBuilder;
32  
33  /**
34   * Primary key class for ProgQuserProgPriv
35   */
36  public class ProgQuserProgPrivPK implements Serializable, Comparable<ProgQuserProgPrivPK>
37  {
38      /**
39       * The serial version UID of this class. Needed for serialization.
40       */
41      private static final long serialVersionUID = 888549131131693469L;
42  
43      public ProgQuserProgPrivPK()
44      {
45      }
46  
47      public ProgQuserProgPrivPK(ProgramImpl program, QuserImpl quser, ProgramPrivilegeImpl programPrivilege)
48      {
49          this.program = program;
50          this.quser = quser;
51          this.programPrivilege = programPrivilege;
52      }
53  
54      private ProgramImpl program;
55  
56      public ProgramImpl getProgram()
57      {
58          return this.program;
59      }
60  
61      public void setProgram(ProgramImpl program)
62      {
63          this.program = program;
64      }
65  
66      private QuserImpl quser;
67  
68      public QuserImpl getQuser()
69      {
70          return this.quser;
71      }
72  
73      public void setQuser(QuserImpl quser)
74      {
75          this.quser = quser;
76      }
77  
78      private ProgramPrivilegeImpl programPrivilege;
79  
80      public ProgramPrivilegeImpl getProgramPrivilege()
81      {
82          return this.programPrivilege;
83      }
84  
85      public void setProgramPrivilege(ProgramPrivilegeImpl programPrivilege)
86      {
87          this.programPrivilege = programPrivilege;
88      }
89  
90      @Override
91      public boolean equals(Object object)
92      {
93          if (this == object)
94          {
95              return true;
96          }
97          if (!(object instanceof ProgQuserProgPrivPK))
98          {
99              return false;
100         }
101         final ProgQuserProgPrivPK that = (ProgQuserProgPrivPK)object;
102         return new EqualsBuilder()
103             .append(this.getProgram(),that.getProgram())
104             .append(this.getQuser(),that.getQuser())
105             .append(this.getProgramPrivilege(),that.getProgramPrivilege())
106             .isEquals();
107     }
108 
109     @Override
110     public int hashCode()
111     {
112         return new HashCodeBuilder()
113             .append(getProgram())
114             .append(getQuser())
115             .append(getProgramPrivilege())
116             .toHashCode();
117     }
118 
119     /**
120      * @see Comparable#compareTo
121      */
122     @Override
123     public int compareTo(ProgQuserProgPrivPK o)
124     {
125         int cmp = 0;
126         return cmp;
127     }
128 }