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