1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.coa.businessobject;
17
18 import org.apache.commons.lang.StringUtils;
19 import org.kuali.ole.sys.businessobject.FiscalYearBasedBusinessObject;
20 import org.kuali.ole.sys.businessobject.SystemOptions;
21 import org.kuali.ole.sys.context.SpringContext;
22 import org.kuali.rice.kew.api.doctype.DocumentTypeService;
23 import org.kuali.rice.kew.doctype.bo.DocumentType;
24 import org.kuali.rice.kew.doctype.bo.DocumentTypeEBO;
25 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
26
27
28
29
30 public class OffsetDefinition extends PersistableBusinessObjectBase implements FiscalYearBasedBusinessObject {
31
32 private static final long serialVersionUID = -6150010338773403021L;
33
34 private Integer universityFiscalYear;
35 private String financialDocumentTypeCode;
36 private String financialBalanceTypeCode;
37 private String chartOfAccountsCode;
38 private String financialObjectCode;
39
40 private SystemOptions universityFiscal;
41 private ObjectCode financialObject;
42 private Chart chartOfAccounts;
43 private BalanceType financialBalanceType;
44 private DocumentTypeEBO financialSystemDocumentTypeCode;
45
46
47
48
49 public OffsetDefinition() {
50
51 }
52
53
54
55
56
57
58 @Override
59 public Integer getUniversityFiscalYear() {
60 return universityFiscalYear;
61 }
62
63
64
65
66
67
68 @Override
69 public void setUniversityFiscalYear(Integer universityFiscalYear) {
70 this.universityFiscalYear = universityFiscalYear;
71 }
72
73
74
75
76
77
78 public SystemOptions getUniversityFiscal() {
79 return universityFiscal;
80 }
81
82
83
84
85
86
87
88 public void setUniversityFiscal(SystemOptions universityFiscal) {
89 this.universityFiscal = universityFiscal;
90 }
91
92
93
94
95
96
97
98 public String getFinancialDocumentTypeCode() {
99 return financialDocumentTypeCode;
100 }
101
102
103
104
105
106
107 public void setFinancialDocumentTypeCode(String financialDocumentTypeCode) {
108 this.financialDocumentTypeCode = financialDocumentTypeCode;
109 }
110
111
112
113
114
115
116 public String getFinancialBalanceTypeCode() {
117 return financialBalanceTypeCode;
118 }
119
120
121
122
123
124
125 public void setFinancialBalanceTypeCode(String financialBalanceTypeCode) {
126 this.financialBalanceTypeCode = financialBalanceTypeCode;
127 }
128
129
130
131
132
133
134 public BalanceType getFinancialBalanceType() {
135 return financialBalanceType;
136 }
137
138
139
140
141
142
143
144 public void setFinancialBalanceType(BalanceType financialBalanceType) {
145 this.financialBalanceType = financialBalanceType;
146 }
147
148
149
150
151
152
153
154 public String getFinancialObjectCode() {
155 return financialObjectCode;
156 }
157
158
159
160
161
162
163 public void setFinancialObjectCode(String financialObjectCode) {
164 this.financialObjectCode = financialObjectCode;
165 }
166
167
168
169
170
171
172
173 public ObjectCode getFinancialObject() {
174 return financialObject;
175 }
176
177
178
179
180
181
182
183 public void setFinancialObject(ObjectCode financialObject) {
184 this.financialObject = financialObject;
185 }
186
187
188
189
190
191
192
193 public String getChartOfAccountsCode() {
194 return chartOfAccountsCode;
195 }
196
197
198
199
200
201
202 public void setChartOfAccountsCode(String chartOfAccountsCode) {
203 this.chartOfAccountsCode = chartOfAccountsCode;
204 }
205
206
207
208
209
210
211 public Chart getChartOfAccounts() {
212 return chartOfAccounts;
213 }
214
215
216
217
218
219
220
221 public void setChartOfAccounts(Chart chartOfAccounts) {
222 this.chartOfAccounts = chartOfAccounts;
223 }
224
225
226
227
228
229
230 public DocumentTypeEBO getFinancialSystemDocumentTypeCode() {
231 if ( StringUtils.isBlank( financialDocumentTypeCode ) ) {
232 financialSystemDocumentTypeCode = null;
233 } else {
234 if ( financialSystemDocumentTypeCode == null || !StringUtils.equals(financialDocumentTypeCode, financialSystemDocumentTypeCode.getName() ) ) {
235 org.kuali.rice.kew.api.doctype.DocumentType temp = SpringContext.getBean(DocumentTypeService.class).getDocumentTypeByName(financialDocumentTypeCode);
236 if ( temp != null ) {
237 financialSystemDocumentTypeCode = DocumentType.from( temp );
238 } else {
239 financialSystemDocumentTypeCode = null;
240 }
241 }
242 }
243 return financialSystemDocumentTypeCode;
244 }
245
246
247
248
249
250
251
252 public String getOffsetDefinitionViewer() {
253 return "View Offset Definition";
254 }
255
256
257 }