Coverage Report - org.kuali.rice.krad.bo.AdHocRouteRecipient
 
Classes in this File Line Coverage Branch Coverage Complexity
AdHocRouteRecipient
0%
0/26
0%
0/2
1.083
 
 1  
 /**
 2  
  * Copyright 2005-2011 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.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  
  * 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  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 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; // can be networkId or group 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  
         // set some defaults that can be overridden
 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  
 }