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.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
35
36 public class ProgQuserProgPrivPK implements Serializable, Comparable<ProgQuserProgPrivPK>
37 {
38
39
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
121
122 @Override
123 public int compareTo(ProgQuserProgPrivPK o)
124 {
125 int cmp = 0;
126 return cmp;
127 }
128 }