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
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 WorkflowDocument workflowDocument;
54
55
56
57
58
59 public DocumentHeader() {
60 super();
61 }
62
63
64
65
66
67
68 public WorkflowDocument getWorkflowDocument() {
69 if (workflowDocument == null) {
70 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.");
71 }
72
73 return workflowDocument;
74 }
75
76
77
78
79
80 public boolean hasWorkflowDocument() {
81 return (workflowDocument != null);
82 }
83
84
85
86
87
88
89 public void setWorkflowDocument(WorkflowDocument workflowDocument) {
90 this.workflowDocument = workflowDocument;
91 }
92
93
94
95
96
97 public String getDocumentNumber() {
98 return this.documentNumber;
99 }
100
101
102
103
104
105 public void setDocumentNumber(String documentNumber) {
106 this.documentNumber = documentNumber;
107 }
108
109
110
111
112
113 public String getDocumentDescription() {
114 return this.documentDescription;
115 }
116
117
118
119
120
121 public void setDocumentDescription(String documentDescription) {
122 this.documentDescription = documentDescription;
123 }
124
125
126
127
128
129 public String getOrganizationDocumentNumber() {
130 return this.organizationDocumentNumber;
131 }
132
133
134
135
136
137 public void setOrganizationDocumentNumber(String organizationDocumentNumber) {
138 this.organizationDocumentNumber = organizationDocumentNumber;
139 }
140
141
142
143
144
145 public String getDocumentTemplateNumber() {
146 return this.documentTemplateNumber;
147 }
148
149
150
151
152
153 public void setDocumentTemplateNumber(String documentTemplateNumber) {
154 this.documentTemplateNumber = documentTemplateNumber;
155 }
156
157
158
159
160
161 public String getExplanation() {
162 return explanation;
163 }
164
165
166
167
168
169 public void setExplanation(String explanation) {
170 this.explanation = explanation;
171 }
172
173 }