|  1 |     | 
     | 
  |  2 |     | 
     | 
  |  3 |     | 
     | 
  |  4 |     | 
     | 
  |  5 |     | 
     | 
  |  6 |     | 
     | 
  |  7 |     | 
     | 
  |  8 |     | 
     | 
  |  9 |     | 
     | 
  |  10 |     | 
     | 
  |  11 |     | 
     | 
  |  12 |     | 
     | 
  |  13 |     | 
     | 
  |  14 |     | 
     | 
  |  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 |     | 
     | 
  |  33 |     | 
     | 
  |  34 |     | 
     | 
  |  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 |     | 
     | 
  |  57 |     | 
     | 
  |  58 |     | 
     | 
  |  59 |     | 
       public DocumentHeader() { | 
  |  60 |    0 |            super();  | 
  |  61 |    0 |        }  | 
  |  62 |     | 
     | 
  |  63 |     | 
         | 
  |  64 |     | 
     | 
  |  65 |     | 
     | 
  |  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 |     | 
     | 
  |  77 |     | 
     | 
  |  78 |     | 
       public boolean hasWorkflowDocument() { | 
  |  79 |    0 |            return (workflowDocument != null);  | 
  |  80 |     | 
       }  | 
  |  81 |     | 
     | 
  |  82 |     | 
     | 
  |  83 |     | 
         | 
  |  84 |     | 
     | 
  |  85 |     | 
     | 
  |  86 |     | 
     | 
  |  87 |     | 
       public void setWorkflowDocument(KualiWorkflowDocument workflowDocument) { | 
  |  88 |    0 |            this.workflowDocument = workflowDocument;  | 
  |  89 |    0 |        }  | 
  |  90 |     | 
     | 
  |  91 |     | 
         | 
  |  92 |     | 
     | 
  |  93 |     | 
     | 
  |  94 |     | 
       public String getDocumentNumber() { | 
  |  95 |    0 |            return this.documentNumber;  | 
  |  96 |     | 
       }  | 
  |  97 |     | 
     | 
  |  98 |     | 
         | 
  |  99 |     | 
     | 
  |  100 |     | 
     | 
  |  101 |     | 
       public void setDocumentNumber(String documentNumber) { | 
  |  102 |    0 |            this.documentNumber = documentNumber;  | 
  |  103 |    0 |        }  | 
  |  104 |     | 
     | 
  |  105 |     | 
         | 
  |  106 |     | 
     | 
  |  107 |     | 
     | 
  |  108 |     | 
       public String getDocumentDescription() { | 
  |  109 |    0 |            return this.documentDescription;  | 
  |  110 |     | 
       }  | 
  |  111 |     | 
     | 
  |  112 |     | 
         | 
  |  113 |     | 
     | 
  |  114 |     | 
     | 
  |  115 |     | 
       public void setDocumentDescription(String documentDescription) { | 
  |  116 |    0 |            this.documentDescription = documentDescription;  | 
  |  117 |    0 |        }  | 
  |  118 |     | 
     | 
  |  119 |     | 
         | 
  |  120 |     | 
     | 
  |  121 |     | 
     | 
  |  122 |     | 
       public String getOrganizationDocumentNumber() { | 
  |  123 |    0 |            return this.organizationDocumentNumber;  | 
  |  124 |     | 
       }  | 
  |  125 |     | 
     | 
  |  126 |     | 
         | 
  |  127 |     | 
     | 
  |  128 |     | 
     | 
  |  129 |     | 
       public void setOrganizationDocumentNumber(String organizationDocumentNumber) { | 
  |  130 |    0 |            this.organizationDocumentNumber = organizationDocumentNumber;  | 
  |  131 |    0 |        }  | 
  |  132 |     | 
     | 
  |  133 |     | 
         | 
  |  134 |     | 
     | 
  |  135 |     | 
     | 
  |  136 |     | 
       public String getDocumentTemplateNumber() { | 
  |  137 |    0 |            return this.documentTemplateNumber;  | 
  |  138 |     | 
       }  | 
  |  139 |     | 
     | 
  |  140 |     | 
         | 
  |  141 |     | 
     | 
  |  142 |     | 
     | 
  |  143 |     | 
       public void setDocumentTemplateNumber(String documentTemplateNumber) { | 
  |  144 |    0 |            this.documentTemplateNumber = documentTemplateNumber;  | 
  |  145 |    0 |        }  | 
  |  146 |     | 
     | 
  |  147 |     | 
         | 
  |  148 |     | 
     | 
  |  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 |     | 
     | 
  |  160 |     | 
     | 
  |  161 |     | 
     | 
  |  162 |     | 
       public String getExplanation() { | 
  |  163 |    0 |            return explanation;  | 
  |  164 |     | 
       }  | 
  |  165 |     | 
     | 
  |  166 |     | 
         | 
  |  167 |     | 
     | 
  |  168 |     | 
     | 
  |  169 |     | 
     | 
  |  170 |     | 
       public void setExplanation(String explanation) { | 
  |  171 |    0 |            this.explanation = explanation;  | 
  |  172 |    0 |        }  | 
  |  173 |     | 
     | 
  |  174 |     | 
   }  |