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