1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.labs.transaction;
17
18 import org.apache.commons.lang.RandomStringUtils;
19
20 import java.io.Serializable;
21 import java.math.BigDecimal;
22 import java.math.MathContext;
23 import java.util.ArrayList;
24 import java.util.Date;
25 import java.util.List;
26
27
28
29
30
31
32 public class TransactionModel implements Serializable {
33
34 private static final long serialVersionUID = 5227859879033967666L;
35 private String id;
36 private String accountId;
37 private String statusString = RandomStringUtils.randomAlphanumeric(4);
38
39 private String idString = RandomStringUtils.randomAlphanumeric(4);
40
41 private TransactionModel parentTransaction;
42 private Date creationDate = new Date();
43 private Date effectiveDate = new Date();
44 private Date originationDate = new Date();
45 private Date recognitionDate = new Date();
46
47 private BigDecimal amount = new BigDecimal(Math.random() * 100, new MathContext(2));
48 private String currencyCode = RandomStringUtils.randomAlphanumeric(4);
49 private BigDecimal nativeAmount = new BigDecimal(Math.random() * 100, new MathContext(2));
50 private String glEntryGenerated = RandomStringUtils.randomAlphanumeric(4);
51 private String internal = RandomStringUtils.randomAlphanumeric(4);
52 private BigDecimal allocatedAmount = new BigDecimal(Math.random() * 100, new MathContext(2));
53 private BigDecimal lockedAllocatedAmount = new BigDecimal(Math.random() * 100, new MathContext(2));
54
55 private String rollupDescription = RandomStringUtils.randomAlphanumeric(4);
56 private String generalLedgerTypeDescription = RandomStringUtils.randomAlphanumeric(4);
57 private String glOverridden = RandomStringUtils.randomAlphanumeric(4);
58
59 private Date clearDate = new Date();
60 private String paymentRefundable = RandomStringUtils.randomAlphanumeric(4);
61 private String paymentRefundRule = RandomStringUtils.randomAlphanumeric(4);
62
63 private BigDecimal originalAmount = new BigDecimal(Math.random() * 100, new MathContext(2));
64 private Date defermentExpirationDate = new Date();
65
66 private String chargeCancellationRule = RandomStringUtils.randomAlphanumeric(4);
67
68 private BigDecimal chargeAmount = new BigDecimal(Math.random() * 100, new MathContext(2));
69 private BigDecimal paymentAmount = new BigDecimal(Math.random() * 100, new MathContext(2));
70 private BigDecimal defermentAmount = new BigDecimal(Math.random() * 100, new MathContext(2));
71 private BigDecimal allocatedLockedAllocated = new BigDecimal(Math.random() * 100, new MathContext(2));
72 private BigDecimal unallocatedAmount = new BigDecimal(Math.random() * 100, new MathContext(2));
73
74 private BigDecimal chargeTotal = new BigDecimal(Math.random() * 100, new MathContext(2));
75 private BigDecimal paymentTotal = new BigDecimal(Math.random() * 100, new MathContext(2));
76 private BigDecimal defermentTotal = new BigDecimal(Math.random() * 100, new MathContext(2));
77 private BigDecimal allocatedTotal = new BigDecimal(Math.random() * 100, new MathContext(2));
78 private BigDecimal unallocatedTotal = new BigDecimal(Math.random() * 100, new MathContext(2));
79 private String transactionDisplayType;
80 private String transactionTypeDescription = "Description Description Description";
81
82 private String tagList = "TAG LIST";
83 private String newTag = "NEW TAG";
84
85 private List<TransactionModel> subTransactions;
86 private List<Tag> tagModels = new ArrayList<Tag>();
87
88 public TransactionModel() {
89 this.id = RandomStringUtils.randomAlphanumeric(4);
90 this.accountId = RandomStringUtils.randomAlphanumeric(4);
91 this.transactionDisplayType = "type" + RandomStringUtils.randomNumeric(2);
92 }
93
94 public TransactionModel(int subTransactionsItemNumber) {
95 this();
96 subTransactions = new ArrayList<TransactionModel>();
97 parentTransaction = new TransactionModel();
98 for (int i = 0; i < subTransactionsItemNumber; i++) {
99 this.subTransactions.add(new TransactionModel(0));
100 }
101
102 for (int i = 0; i < subTransactionsItemNumber; i++) {
103 this.tagModels.add(new Tag());
104 }
105 }
106
107 public String getAccountId() {
108 return accountId;
109 }
110
111 public void setAccountId(String accountId) {
112 this.accountId = accountId;
113 }
114
115 public BigDecimal getAllocatedAmount() {
116 return allocatedAmount;
117 }
118
119 public void setAllocatedAmount(BigDecimal allocatedAmount) {
120 this.allocatedAmount = allocatedAmount;
121 }
122
123 public BigDecimal getAmount() {
124 return amount;
125 }
126
127 public void setAmount(BigDecimal amount) {
128 this.amount = amount;
129 }
130
131 public String getChargeCancellationRule() {
132 return chargeCancellationRule;
133 }
134
135 public void setChargeCancellationRule(String chargeCancellationRule) {
136 this.chargeCancellationRule = chargeCancellationRule;
137 }
138
139 public Date getClearDate() {
140 return clearDate;
141 }
142
143 public void setClearDate(Date clearDate) {
144 this.clearDate = clearDate;
145 }
146
147 public Date getCreationDate() {
148 return creationDate;
149 }
150
151 public void setCreationDate(Date creationDate) {
152 this.creationDate = creationDate;
153 }
154
155 public String getCurrencyCode() {
156 return currencyCode;
157 }
158
159 public void setCurrencyCode(String currencyCode) {
160 this.currencyCode = currencyCode;
161 }
162
163 public Date getDefermentExpirationDate() {
164 return defermentExpirationDate;
165 }
166
167 public void setDefermentExpirationDate(Date defermentExpirationDate) {
168 this.defermentExpirationDate = defermentExpirationDate;
169 }
170
171 public String getGeneralLedgerTypeDescription() {
172 return generalLedgerTypeDescription;
173 }
174
175 public void setGeneralLedgerTypeDescription(String generalLedgerTypeDescription) {
176 this.generalLedgerTypeDescription = generalLedgerTypeDescription;
177 }
178
179 public String getGlEntryGenerated() {
180 return glEntryGenerated;
181 }
182
183 public void setGlEntryGenerated(String glEntryGenerated) {
184 this.glEntryGenerated = glEntryGenerated;
185 }
186
187 public String getGlOverridden() {
188 return glOverridden;
189 }
190
191 public void setGlOverridden(String glOverridden) {
192 this.glOverridden = glOverridden;
193 }
194
195 public String getIdString() {
196 return idString;
197 }
198
199 public void setIdString(String idString) {
200 this.idString = idString;
201 }
202
203 public String getInternal() {
204 return internal;
205 }
206
207 public void setInternal(String internal) {
208 this.internal = internal;
209 }
210
211 public BigDecimal getLockedAllocatedAmount() {
212 return lockedAllocatedAmount;
213 }
214
215 public void setLockedAllocatedAmount(BigDecimal lockedAllocatedAmount) {
216 this.lockedAllocatedAmount = lockedAllocatedAmount;
217 }
218
219 public BigDecimal getNativeAmount() {
220 return nativeAmount;
221 }
222
223 public void setNativeAmount(BigDecimal nativeAmount) {
224 this.nativeAmount = nativeAmount;
225 }
226
227 public BigDecimal getOriginalAmount() {
228 return originalAmount;
229 }
230
231 public void setOriginalAmount(BigDecimal originalAmount) {
232 this.originalAmount = originalAmount;
233 }
234
235 public Date getOriginationDate() {
236 return originationDate;
237 }
238
239 public void setOriginationDate(Date originationDate) {
240 this.originationDate = originationDate;
241 }
242
243 public TransactionModel getParentTransaction() {
244 return parentTransaction;
245 }
246
247 public void setParentTransaction(TransactionModel parentTransaction) {
248 this.parentTransaction = parentTransaction;
249 }
250
251 public String getPaymentRefundable() {
252 return paymentRefundable;
253 }
254
255 public void setPaymentRefundable(String paymentRefundable) {
256 this.paymentRefundable = paymentRefundable;
257 }
258
259 public String getPaymentRefundRule() {
260 return paymentRefundRule;
261 }
262
263 public void setPaymentRefundRule(String paymentRefundRule) {
264 this.paymentRefundRule = paymentRefundRule;
265 }
266
267 public Date getRecognitionDate() {
268 return recognitionDate;
269 }
270
271 public void setRecognitionDate(Date recognitionDate) {
272 this.recognitionDate = recognitionDate;
273 }
274
275 public String getRollupDescription() {
276 return rollupDescription;
277 }
278
279 public void setRollupDescription(String rollupDescription) {
280 this.rollupDescription = rollupDescription;
281 }
282
283 public String getStatusString() {
284 return statusString;
285 }
286
287 public void setStatusString(String statusString) {
288 this.statusString = statusString;
289 }
290
291 public BigDecimal getAllocatedTotal() {
292 return allocatedTotal;
293 }
294
295 public void setAllocatedTotal(BigDecimal allocatedTotal) {
296 this.allocatedTotal = allocatedTotal;
297 }
298
299 public BigDecimal getChargeAmount() {
300 return chargeAmount;
301 }
302
303 public void setChargeAmount(BigDecimal chargeAmount) {
304 this.chargeAmount = chargeAmount;
305 }
306
307 public BigDecimal getAllocatedLockedAllocated() {
308 return allocatedLockedAllocated;
309 }
310
311 public void setAllocatedLockedAllocated(BigDecimal allocatedLockedAllocated) {
312 this.allocatedLockedAllocated = allocatedLockedAllocated;
313 }
314
315 public BigDecimal getDefermentAmount() {
316 return defermentAmount;
317 }
318
319 public void setDefermentAmount(BigDecimal defermentAmount) {
320 this.defermentAmount = defermentAmount;
321 }
322
323 public BigDecimal getPaymentAmount() {
324 return paymentAmount;
325 }
326
327 public void setPaymentAmount(BigDecimal paymentAmount) {
328 this.paymentAmount = paymentAmount;
329 }
330
331 public BigDecimal getUnallocatedAmount() {
332 return unallocatedAmount;
333 }
334
335 public void setUnallocatedAmount(BigDecimal unallocatedAmount) {
336 this.unallocatedAmount = unallocatedAmount;
337 }
338
339 public BigDecimal getChargeTotal() {
340 return chargeTotal;
341 }
342
343 public void setChargeTotal(BigDecimal chargeTotal) {
344 this.chargeTotal = chargeTotal;
345 }
346
347 public BigDecimal getDefermentTotal() {
348 return defermentTotal;
349 }
350
351 public void setDefermentTotal(BigDecimal defermentTotal) {
352 this.defermentTotal = defermentTotal;
353 }
354
355 public Date getEffectiveDate() {
356 return effectiveDate;
357 }
358
359 public void setEffectiveDate(Date effectiveDate) {
360 this.effectiveDate = effectiveDate;
361 }
362
363 public String getId() {
364 return id;
365 }
366
367 public void setId(String id) {
368 this.id = id;
369 }
370
371 public BigDecimal getPaymentTotal() {
372 return paymentTotal;
373 }
374
375 public void setPaymentTotal(BigDecimal paymentTotal) {
376 this.paymentTotal = paymentTotal;
377 }
378
379 public List<TransactionModel> getSubTransactions() {
380 return subTransactions;
381 }
382
383 public void setSubTransactions(List<TransactionModel> subTransactions) {
384 this.subTransactions = subTransactions;
385 }
386
387 public String getTagList() {
388 return tagList;
389 }
390
391 public void setTagList(String tagList) {
392 this.tagList = tagList;
393 }
394
395 public String getTransactionDisplayType() {
396 return transactionDisplayType;
397 }
398
399 public void setTransactionDisplayType(String transactionDisplayType) {
400 this.transactionDisplayType = transactionDisplayType;
401 }
402
403 public String getTransactionTypeDescription() {
404 return transactionTypeDescription;
405 }
406
407 public void setTransactionTypeDescription(String transactionTypeDescription) {
408 this.transactionTypeDescription = transactionTypeDescription;
409 }
410
411 public BigDecimal getUnallocatedTotal() {
412 return unallocatedTotal;
413 }
414
415 public void setUnallocatedTotal(BigDecimal unallocatedTotal) {
416 this.unallocatedTotal = unallocatedTotal;
417 }
418
419 public String getNewTag() {
420 return newTag;
421 }
422
423 public void setNewTag(String newTag) {
424 this.newTag = newTag;
425 }
426
427 public List<Tag> getTagModels() {
428 return tagModels;
429 }
430
431 public void setTagModels(List<Tag> tagModels) {
432 this.tagModels = tagModels;
433 }
434 }
435