1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.bo;
17
18 import org.kuali.rice.core.api.exception.RiceRuntimeException;
19
20 import javax.persistence.Column;
21 import javax.persistence.Entity;
22 import javax.persistence.Id;
23 import javax.persistence.Table;
24 import javax.persistence.Transient;
25
26 import org.kuali.rice.core.api.exception.RiceRuntimeException;
27 import org.kuali.rice.kew.api.WorkflowDocument;
28
29
30
31
32
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 WorkflowDocument workflowDocument;
52
53
54
55
56
57 public DocumentHeader() {
58 super();
59 }
60
61
62
63
64
65 public WorkflowDocument getWorkflowDocument() {
66 if (workflowDocument == null) {
67 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 return workflowDocument;
71 }
72
73
74
75
76 public boolean hasWorkflowDocument() {
77 return (workflowDocument != null);
78 }
79
80
81
82
83
84
85 public void setWorkflowDocument(WorkflowDocument workflowDocument) {
86 this.workflowDocument = workflowDocument;
87 }
88
89
90
91
92 public String getDocumentNumber() {
93 return this.documentNumber;
94 }
95
96
97
98
99 public void setDocumentNumber(String documentNumber) {
100 this.documentNumber = documentNumber;
101 }
102
103
104
105
106 public String getDocumentDescription() {
107 return this.documentDescription;
108 }
109
110
111
112
113 public void setDocumentDescription(String documentDescription) {
114 this.documentDescription = documentDescription;
115 }
116
117
118
119
120 public String getOrganizationDocumentNumber() {
121 return this.organizationDocumentNumber;
122 }
123
124
125
126
127 public void setOrganizationDocumentNumber(String organizationDocumentNumber) {
128 this.organizationDocumentNumber = organizationDocumentNumber;
129 }
130
131
132
133
134 public String getDocumentTemplateNumber() {
135 return this.documentTemplateNumber;
136 }
137
138
139
140
141 public void setDocumentTemplateNumber(String documentTemplateNumber) {
142 this.documentTemplateNumber = documentTemplateNumber;
143 }
144
145
146
147
148
149 public String getExplanation() {
150 return explanation;
151 }
152
153
154
155
156
157 public void setExplanation(String explanation) {
158 this.explanation = explanation;
159 }
160
161 }