1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.krad.bo; |
17 | |
|
18 | |
import org.apache.commons.lang.builder.HashCodeBuilder; |
19 | |
|
20 | |
import javax.persistence.Column; |
21 | |
import javax.persistence.Id; |
22 | |
import java.io.Serializable; |
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
public class AdHocRoutePersonId implements Serializable { |
31 | |
|
32 | |
private static final long serialVersionUID = -2030160650786561367L; |
33 | |
|
34 | |
@Column(name="RECIP_TYP_CD") |
35 | |
private Integer type; |
36 | |
@Id |
37 | |
@Column(name="ACTN_RQST_CD") |
38 | |
private String actionRequested; |
39 | |
@Id |
40 | |
@Column(name="ACTN_RQST_RECIP_ID") |
41 | |
private String id; |
42 | |
|
43 | 0 | public AdHocRoutePersonId() {} |
44 | |
|
45 | 0 | public AdHocRoutePersonId(Integer type, String actionRequested, String id) { |
46 | 0 | this.type = type; |
47 | 0 | this.actionRequested = actionRequested; |
48 | 0 | this.id = id; |
49 | 0 | } |
50 | |
|
51 | |
public Integer getType() { |
52 | 0 | return this.type; |
53 | |
} |
54 | |
|
55 | |
public String getActionRequested() { |
56 | 0 | return this.actionRequested; |
57 | |
} |
58 | |
|
59 | |
public String getId() { |
60 | 0 | return this.id; |
61 | |
} |
62 | |
|
63 | |
public boolean equals(Object o) { |
64 | 0 | if (o == this) return true; |
65 | 0 | if (!(o instanceof AdHocRoutePersonId)) return false; |
66 | 0 | if (o == null) return false; |
67 | 0 | AdHocRoutePersonId pk = (AdHocRoutePersonId) o; |
68 | 0 | return getType() != null && getActionRequested() != null && getId() != null && getType().equals(pk.getType()) && getActionRequested().equals(pk.getActionRequested()) && getId().equals(pk.getId()); |
69 | |
} |
70 | |
|
71 | |
public int hashCode() { |
72 | 0 | return new HashCodeBuilder().append(type).append(actionRequested).append(id).toHashCode(); |
73 | |
} |
74 | |
|
75 | |
} |
76 | |
|