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 private static Map actionRequestCds;
40 public static final Integer PERSON_TYPE = new Integer(0);
41 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 public AdHocRouteRecipient() {
62
63 this.actionRequested = KewApiConstants.ACTION_REQUEST_APPROVE_REQ;
64 this.versionNumber = new Long(1);
65 }
66
67 public String getActionRequested() {
68 return actionRequested;
69 }
70
71 public void setActionRequested(String actionRequested) {
72 this.actionRequested = actionRequested;
73 }
74
75 public String getId() {
76 return id;
77 }
78
79 public void setId(String id) {
80 this.id = id;
81 }
82
83 public String getName() {
84 return name;
85 }
86
87 public void setName(String name) {
88 this.name = name;
89 }
90
91 public Integer getType() {
92 return type;
93 }
94
95 public void setType(Integer type) {
96 this.type = type;
97 }
98
99 public void setdocumentNumber (String documentNumber){
100 this.documentNumber = documentNumber;
101 }
102
103 public String getdocumentNumber (){
104 return documentNumber;
105 }
106
107 public String getActionRequestedValue() {
108 String actionRequestedValue = null;
109 if (StringUtils.isNotBlank(getActionRequested())) {
110 actionRequestCds.clear();
111 actionRequestCds.putAll(CodeTranslator.arLabels);
112 actionRequestedValue = (String) actionRequestCds.get(getActionRequested());
113 }
114
115 return actionRequestedValue;
116 }
117 }