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