Coverage Report - org.kuali.rice.kns.bo.DocumentHeader
 
Classes in this File Line Coverage Branch Coverage Complexity
DocumentHeader
0%
0/26
0%
0/4
1.133
 
 1  
 /*
 2  
  * Copyright 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  
 
 17  
 package org.kuali.rice.kns.bo;
 18  
 
 19  
 import java.util.LinkedHashMap;
 20  
 
 21  
 import javax.persistence.Column;
 22  
 import javax.persistence.Entity;
 23  
 import javax.persistence.Id;
 24  
 import javax.persistence.Table;
 25  
 import javax.persistence.Transient;
 26  
 
 27  
 import org.kuali.rice.kns.util.KNSPropertyConstants;
 28  
 import org.kuali.rice.kns.workflow.service.KualiWorkflowDocument;
 29  
 
 30  
 
 31  
 /**
 32  
  * Interface for {@link DocumentHeaderBase} 
 33  
  * 
 34  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 35  
  */
 36  
 @Entity
 37  
 @Table(name="KRNS_DOC_HDR_T")
 38  
 public class DocumentHeader extends PersistableBusinessObjectBase {
 39  
 
 40  
     @Id
 41  
         @Column(name="DOC_HDR_ID")
 42  
         private String documentNumber;
 43  
     @Column(name="FDOC_DESC")
 44  
         private String documentDescription;
 45  
     @Column(name="ORG_DOC_HDR_ID")
 46  
         private String organizationDocumentNumber;
 47  
     @Column(name="TMPL_DOC_HDR_ID")
 48  
         private String documentTemplateNumber;
 49  
     @Column(name="EXPLANATION")
 50  
         private String explanation;
 51  
     
 52  
     @Transient
 53  
     private KualiWorkflowDocument workflowDocument;
 54  
 
 55  
     /**
 56  
      * Constructor - creates empty instances of dependent objects
 57  
      * 
 58  
      */
 59  
     public DocumentHeader() {
 60  0
         super();
 61  0
     }
 62  
 
 63  
     /**
 64  
      * 
 65  
      * @return workflowDocument
 66  
      */
 67  
     public KualiWorkflowDocument getWorkflowDocument() {
 68  0
         if (workflowDocument == null) {
 69  0
             throw new RuntimeException("transient workflowDocument is null - this should never happen");
 70  
         }
 71  
 
 72  0
         return workflowDocument;
 73  
     }
 74  
 
 75  
     /**
 76  
      * @return true if the workflowDocument is not null
 77  
      */
 78  
     public boolean hasWorkflowDocument() {
 79  0
         return (workflowDocument != null);
 80  
     }
 81  
 
 82  
 
 83  
     /**
 84  
      * 
 85  
      * @param workflowDocument
 86  
      */
 87  
     public void setWorkflowDocument(KualiWorkflowDocument workflowDocument) {
 88  0
         this.workflowDocument = workflowDocument;
 89  0
     }
 90  
 
 91  
     /**
 92  
      * @return the documentNumber
 93  
      */
 94  
     public String getDocumentNumber() {
 95  0
         return this.documentNumber;
 96  
     }
 97  
 
 98  
     /**
 99  
      * @param documentNumber the documentNumber to set
 100  
      */
 101  
     public void setDocumentNumber(String documentNumber) {
 102  0
         this.documentNumber = documentNumber;
 103  0
     }
 104  
 
 105  
     /**
 106  
      * @return the documentDescription
 107  
      */
 108  
     public String getDocumentDescription() {
 109  0
         return this.documentDescription;
 110  
     }
 111  
 
 112  
     /**
 113  
      * @param documentDescription the documentDescription to set
 114  
      */
 115  
     public void setDocumentDescription(String documentDescription) {
 116  0
         this.documentDescription = documentDescription;
 117  0
     }
 118  
 
 119  
     /**
 120  
      * @return the organizationDocumentNumber
 121  
      */
 122  
     public String getOrganizationDocumentNumber() {
 123  0
         return this.organizationDocumentNumber;
 124  
     }
 125  
 
 126  
     /**
 127  
      * @param organizationDocumentNumber the organizationDocumentNumber to set
 128  
      */
 129  
     public void setOrganizationDocumentNumber(String organizationDocumentNumber) {
 130  0
         this.organizationDocumentNumber = organizationDocumentNumber;
 131  0
     }
 132  
 
 133  
     /**
 134  
      * @return the documentTemplateNumber
 135  
      */
 136  
     public String getDocumentTemplateNumber() {
 137  0
         return this.documentTemplateNumber;
 138  
     }
 139  
 
 140  
     /**
 141  
      * @param documentTemplateNumber the documentTemplateNumber to set
 142  
      */
 143  
     public void setDocumentTemplateNumber(String documentTemplateNumber) {
 144  0
         this.documentTemplateNumber = documentTemplateNumber;
 145  0
     }
 146  
 
 147  
     /**
 148  
      * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
 149  
      */
 150  
     protected LinkedHashMap toStringMapper() {
 151  0
         LinkedHashMap m = new LinkedHashMap();
 152  
 
 153  0
         m.put(KNSPropertyConstants.DOCUMENT_NUMBER, documentNumber);
 154  
 
 155  0
         return m;
 156  
     }
 157  
 
 158  
     /**
 159  
      * Gets the explanation attribute. 
 160  
      * @return Returns the explanation.
 161  
      */
 162  
     public String getExplanation() {
 163  0
         return explanation;
 164  
     }
 165  
 
 166  
     /**
 167  
      * Sets the explanation attribute value.
 168  
      * @param explanation The explanation to set.
 169  
      */
 170  
     public void setExplanation(String explanation) {
 171  0
         this.explanation = explanation;
 172  0
     }
 173  
 
 174  
 }