1
2
3
4
5
6 package fr.ifremer.quadrige3.core.dao.administration.program;
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
35
36 public class ProgDepProgPrivPK implements Serializable, Comparable<ProgDepProgPrivPK>
37 {
38
39
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
121
122 @Override
123 public int compareTo(ProgDepProgPrivPK o)
124 {
125 int cmp = 0;
126 return cmp;
127 }
128 }