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.DepartmentImpl;
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 ProgDepProgPriv
35   */
36  public class ProgDepProgPrivPK implements Serializable, Comparable<ProgDepProgPrivPK>
37  {
38      /**
39       * The serial version UID of this class. Needed for serialization.
40       */
41      private static final long serialVersionUID = 2852573315715789876L;
42  
43      public ProgDepProgPrivPK()
44      {
45      }
46  
47      public ProgDepProgPrivPK(DepartmentImpl department, ProgramImpl program, ProgramPrivilegeImpl programPrivilege)
48      {
49          this.department = department;
50          this.program = program;
51          this.programPrivilege = programPrivilege;
52      }
53  
54      private DepartmentImpl department;
55  
56      public DepartmentImpl getDepartment()
57      {
58          return this.department;
59      }
60  
61      public void setDepartment(DepartmentImpl department)
62      {
63          this.department = department;
64      }
65  
66      private ProgramImpl program;
67  
68      public ProgramImpl getProgram()
69      {
70          return this.program;
71      }
72  
73      public void setProgram(ProgramImpl program)
74      {
75          this.program = program;
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 ProgDepProgPrivPK))
98          {
99              return false;
100         }
101         final ProgDepProgPrivPK that = (ProgDepProgPrivPK)object;
102         return new EqualsBuilder()
103             .append(this.getDepartment(),that.getDepartment())
104             .append(this.getProgram(),that.getProgram())
105             .append(this.getProgramPrivilege(),that.getProgramPrivilege())
106             .isEquals();
107     }
108 
109     @Override
110     public int hashCode()
111     {
112         return new HashCodeBuilder()
113             .append(getDepartment())
114             .append(getProgram())
115             .append(getProgramPrivilege())
116             .toHashCode();
117     }
118 
119     /**
120      * @see Comparable#compareTo
121      */
122     @Override
123     public int compareTo(ProgDepProgPrivPK o)
124     {
125         int cmp = 0;
126         return cmp;
127     }
128 }