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