1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.ole.fp.businessobject;
18
19 import java.sql.Date;
20 import java.util.ArrayList;
21 import java.util.LinkedHashMap;
22 import java.util.List;
23
24 import org.kuali.ole.fp.document.CashManagementDocument;
25 import org.kuali.ole.fp.document.CashReceiptDocument;
26 import org.kuali.ole.sys.OLEPropertyConstants;
27 import org.kuali.ole.sys.businessobject.Bank;
28 import org.kuali.rice.core.api.util.type.KualiDecimal;
29 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
30
31
32
33
34
35 public class Deposit extends PersistableBusinessObjectBase {
36
37 private String documentNumber;
38 private Integer financialDocumentDepositLineNumber;
39
40 private String depositTypeCode;
41 private Date depositDate;
42 private KualiDecimal depositAmount;
43 private String depositTicketNumber;
44
45 private String depositBankCode;
46
47 private CurrencyDetail depositedCurrency;
48 private CoinDetail depositedCoin;
49
50 private Bank bank;
51 private CashManagementDocument cashManagementDocument;
52 private List depositCashReceiptControl;
53
54
55
56
57
58 public Deposit() {
59 depositCashReceiptControl = new ArrayList();
60 bank = new Bank();
61 }
62
63
64
65
66
67 public Bank getBank() {
68 return bank;
69 }
70
71
72
73
74
75 public void setBank(Bank bank) {
76 this.bank = bank;
77 }
78
79
80
81
82 public CashManagementDocument getCashManagementDocument() {
83 return cashManagementDocument;
84 }
85
86
87
88
89
90
91 public void setCashManagementDocument(CashManagementDocument cashManagementDocument) {
92 this.cashManagementDocument = cashManagementDocument;
93 }
94
95
96
97
98
99 public List getDepositCashReceiptControl() {
100 return depositCashReceiptControl;
101 }
102
103
104
105
106
107
108 public void setDepositCashReceiptControl(List depositCashReceiptControl) {
109 this.depositCashReceiptControl = depositCashReceiptControl;
110 }
111
112
113
114
115 public KualiDecimal getDepositAmount() {
116 return depositAmount;
117 }
118
119
120
121
122
123
124 public void setDepositAmount(KualiDecimal depositAmount) {
125 this.depositAmount = depositAmount;
126 }
127
128
129
130
131
132 public String getDepositBankCode() {
133 return depositBankCode;
134 }
135
136
137
138
139
140
141 public void setDepositBankCode(String depositBankCode) {
142 this.depositBankCode = depositBankCode;
143 }
144
145
146
147
148
149 public Date getDepositDate() {
150 return depositDate;
151 }
152
153
154
155
156
157
158 public void setDepositDate(Date depositDate) {
159 this.depositDate = depositDate;
160 }
161
162
163
164
165
166 public String getDepositTicketNumber() {
167 return depositTicketNumber;
168 }
169
170
171
172
173
174
175 public void setDepositTicketNumber(String depositTicketNumber) {
176 this.depositTicketNumber = depositTicketNumber;
177 }
178
179
180
181
182 public String getRawDepositTypeCode() {
183 return depositTypeCode;
184 }
185
186
187
188
189 public String getDepositTypeCode() {
190 return depositTypeCode;
191 }
192
193
194
195
196
197
198 public void setDepositTypeCode(String depositTypeCode) {
199 this.depositTypeCode = depositTypeCode;
200 }
201
202
203
204
205
206 public Integer getFinancialDocumentDepositLineNumber() {
207 return financialDocumentDepositLineNumber;
208 }
209
210
211
212
213
214
215 public void setFinancialDocumentDepositLineNumber(Integer financialDocumentDepositLineNumber) {
216 this.financialDocumentDepositLineNumber = financialDocumentDepositLineNumber;
217 }
218
219
220
221
222
223 public String getDocumentNumber() {
224 return documentNumber;
225 }
226
227
228
229
230
231
232 public void setDocumentNumber(String documentNumber) {
233 this.documentNumber = documentNumber;
234 }
235
236
237
238
239
240
241 protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
242 LinkedHashMap m = new LinkedHashMap();
243 m.put(OLEPropertyConstants.DOCUMENT_NUMBER, getDocumentNumber());
244 m.put("financialDocumentDepositLineNumber", getFinancialDocumentDepositLineNumber());
245 return m;
246 }
247
248
249
250
251
252
253
254
255 public boolean keysEqual(Deposit other) {
256 boolean keysEqual = false;
257
258 if (getDocumentNumber().equals(other.getDocumentNumber())) {
259 if (getFinancialDocumentDepositLineNumber().equals(other.getFinancialDocumentDepositLineNumber())) {
260 keysEqual = true;
261 }
262 }
263
264 return keysEqual;
265 }
266
267
268
269
270
271
272
273 public boolean containsCashReceipt(CashReceiptDocument crDoc) {
274 boolean result = false;
275 for (int i = 0; i < this.getDepositCashReceiptControl().size() && !result; i++) {
276 DepositCashReceiptControl crCtrl = (DepositCashReceiptControl) getDepositCashReceiptControl().get(i);
277 result = crCtrl.getFinancialDocumentCashReceiptNumber().equals(crDoc.getDocumentNumber());
278 }
279 return result;
280 }
281
282
283
284
285
286
287 public CoinDetail getDepositedCoin() {
288 return depositedCoin;
289 }
290
291
292
293
294
295
296
297 public void setDepositedCoin(CoinDetail depositedCoin) {
298 this.depositedCoin = depositedCoin;
299 }
300
301
302
303
304
305
306
307 public CurrencyDetail getDepositedCurrency() {
308 return depositedCurrency;
309 }
310
311
312
313
314
315
316
317 public void setDepositedCurrency(CurrencyDetail depositedCurrency) {
318 this.depositedCurrency = depositedCurrency;
319 }
320 }