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