Clover Coverage Report - krad-app-framework 2.0.0-SNAPSHOT
Coverage timestamp: Wed Dec 31 1969 19:00:00 EST
../../../../../img/srcFileCovDistChart0.png 0% of files have more coverage
14   106   12   1.27
2   67   0.86   11
11     1.09  
1    
 
  AdHocRouteRecipient       Line # 34 14 0% 12 27 0% 0.0
 
No Tests
 
1    /*
2    * Copyright 2005-2007 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10    * Unless required by applicable law or agreed to in writing, software
11    * distributed under the License is distributed on an "AS IS" BASIS,
12    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13    * See the License for the specific language governing permissions and
14    * limitations under the License.
15    */
16    package org.kuali.rice.kns.bo;
17   
18    import org.apache.commons.lang.StringUtils;
19    import org.kuali.rice.kew.util.CodeTranslator;
20    import org.kuali.rice.kew.util.KEWConstants;
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    * TODO we should not be referencing kew constants from this class and wedding ourselves to that workflow application Ad Hoc Route
31    * Recipient Business Object
32    */
33    @MappedSuperclass
 
34    public abstract class AdHocRouteRecipient extends PersistableBusinessObjectBase {
35   
36    private static final long serialVersionUID = -6499610180752232494L;
37    private static Map actionRequestCds = CodeTranslator.arLabels;
38    public static final Integer PERSON_TYPE = new Integer(0);
39    public static final Integer WORKGROUP_TYPE = new Integer(1);
40   
41    @Id
42    @Column(name="RECIP_TYP_CD")
43    protected Integer type;
44    @Id
45    @Column(name="ACTN_RQST_CD")
46    protected String actionRequested;
47    @Id
48    @Column(name="ACTN_RQST_RECIP_ID")
49    protected String id; // can be networkId or group id
50    @Transient
51    protected String name;
52    @Column(name="DOC_HDR_ID")
53    protected String documentNumber;
54   
 
55  0 toggle public AdHocRouteRecipient() {
56    // set some defaults that can be overridden
57  0 this.actionRequested = KEWConstants.ACTION_REQUEST_APPROVE_REQ;
58  0 this.versionNumber = new Long(1);
59    }
60   
 
61  0 toggle public String getActionRequested() {
62  0 return actionRequested;
63    }
64   
 
65  0 toggle public void setActionRequested(String actionRequested) {
66  0 this.actionRequested = actionRequested;
67    }
68   
 
69  0 toggle public String getId() {
70  0 return id;
71    }
72   
 
73  0 toggle public void setId(String id) {
74  0 this.id = id;
75    }
76   
77    public abstract String getName();
78   
 
79  0 toggle public void setName( String name ) {
80    // do nothing, assume names come from subclasses
81    }
82   
 
83  0 toggle public Integer getType() {
84  0 return type;
85    }
86   
 
87  0 toggle public void setType(Integer type) {
88  0 this.type = type;
89    }
90   
 
91  0 toggle public void setdocumentNumber (String documentNumber){
92  0 this.documentNumber = documentNumber;
93    }
94   
 
95  0 toggle public String getdocumentNumber (){
96  0 return documentNumber;
97    }
98   
 
99  0 toggle public String getActionRequestedValue() {
100  0 String actionRequestedValue = null;
101  0 if (StringUtils.isNotBlank(getActionRequested())) {
102  0 actionRequestedValue = (String) actionRequestCds.get(getActionRequested());
103    }
104  0 return actionRequestedValue;
105    }
106    }