1
2
3
4
5
6 package fr.ifremer.quadrige2.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
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
36
37 public class ProgQuserProgPrivPK implements Serializable, Comparable<ProgQuserProgPrivPK>
38 {
39
40
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
122
123 @Override
124 public int compareTo(ProgQuserProgPrivPK o)
125 {
126 int cmp = 0;
127 return cmp;
128 }
129 }