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