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