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.StringUtils; |
19 | |
import org.kuali.rice.kew.api.KewApiConstants; |
20 | |
import org.kuali.rice.kew.api.util.CodeTranslator; |
21 | |
|
22 | |
import javax.persistence.Column; |
23 | |
import javax.persistence.Id; |
24 | |
import javax.persistence.MappedSuperclass; |
25 | |
import javax.persistence.Transient; |
26 | |
import java.util.Map; |
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
@MappedSuperclass |
36 | |
public class AdHocRouteRecipient extends PersistableBusinessObjectBase { |
37 | |
private static final long serialVersionUID = -6499610180752232494L; |
38 | |
|
39 | 0 | private static Map actionRequestCds = CodeTranslator.arLabels; |
40 | 0 | public static final Integer PERSON_TYPE = new Integer(0); |
41 | 0 | public static final Integer WORKGROUP_TYPE = new Integer(1); |
42 | |
|
43 | |
@Id |
44 | |
@Column(name="RECIP_TYP_CD") |
45 | |
protected Integer type; |
46 | |
|
47 | |
@Id |
48 | |
@Column(name="ACTN_RQST_CD") |
49 | |
protected String actionRequested; |
50 | |
|
51 | |
@Id |
52 | |
@Column(name="ACTN_RQST_RECIP_ID") |
53 | |
protected String id; |
54 | |
|
55 | |
@Transient |
56 | |
protected String name; |
57 | |
|
58 | |
@Column(name="DOC_HDR_ID") |
59 | |
protected String documentNumber; |
60 | |
|
61 | 0 | public AdHocRouteRecipient() { |
62 | |
|
63 | 0 | this.actionRequested = KewApiConstants.ACTION_REQUEST_APPROVE_REQ; |
64 | 0 | this.versionNumber = new Long(1); |
65 | 0 | } |
66 | |
|
67 | |
public String getActionRequested() { |
68 | 0 | return actionRequested; |
69 | |
} |
70 | |
|
71 | |
public void setActionRequested(String actionRequested) { |
72 | 0 | this.actionRequested = actionRequested; |
73 | 0 | } |
74 | |
|
75 | |
public String getId() { |
76 | 0 | return id; |
77 | |
} |
78 | |
|
79 | |
public void setId(String id) { |
80 | 0 | this.id = id; |
81 | 0 | } |
82 | |
|
83 | |
public String getName() { |
84 | 0 | return name; |
85 | |
} |
86 | |
|
87 | |
public void setName(String name) { |
88 | 0 | this.name = name; |
89 | 0 | } |
90 | |
|
91 | |
public Integer getType() { |
92 | 0 | return type; |
93 | |
} |
94 | |
|
95 | |
public void setType(Integer type) { |
96 | 0 | this.type = type; |
97 | 0 | } |
98 | |
|
99 | |
public void setdocumentNumber (String documentNumber){ |
100 | 0 | this.documentNumber = documentNumber; |
101 | 0 | } |
102 | |
|
103 | |
public String getdocumentNumber (){ |
104 | 0 | return documentNumber; |
105 | |
} |
106 | |
|
107 | |
public String getActionRequestedValue() { |
108 | 0 | String actionRequestedValue = null; |
109 | 0 | if (StringUtils.isNotBlank(getActionRequested())) { |
110 | 0 | actionRequestedValue = (String) actionRequestCds.get(getActionRequested()); |
111 | |
} |
112 | |
|
113 | 0 | return actionRequestedValue; |
114 | |
} |
115 | |
} |