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