001/**
002 * Copyright 2005-2015 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.krad.labs.transaction;
017
018import org.apache.commons.lang.RandomStringUtils;
019
020import java.io.Serializable;
021import java.math.BigDecimal;
022import java.math.MathContext;
023import java.util.ArrayList;
024import java.util.Date;
025import java.util.List;
026
027/**
028 * Dummy test object for testing
029 *
030 * @author Kuali Rice Team (rice.collab@kuali.org)
031 */
032public class TransactionModel implements Serializable {
033
034    private static final long serialVersionUID = 5227859879033967666L;
035    private String id;
036    private String accountId;
037    private String statusString = RandomStringUtils.randomAlphanumeric(4);
038
039    private String idString = RandomStringUtils.randomAlphanumeric(4);
040
041    private TransactionModel parentTransaction;
042    private Date creationDate = new Date();
043    private Date effectiveDate = new Date();
044    private Date originationDate = new Date();
045    private Date recognitionDate = new Date();
046
047    private BigDecimal amount = new BigDecimal(Math.random() * 100, new MathContext(2));
048    private String currencyCode = RandomStringUtils.randomAlphanumeric(4);
049    private BigDecimal nativeAmount = new BigDecimal(Math.random() * 100, new MathContext(2));
050    private String glEntryGenerated = RandomStringUtils.randomAlphanumeric(4);
051    private String internal = RandomStringUtils.randomAlphanumeric(4);
052    private BigDecimal allocatedAmount = new BigDecimal(Math.random() * 100, new MathContext(2));
053    private BigDecimal lockedAllocatedAmount = new BigDecimal(Math.random() * 100, new MathContext(2));
054
055    private String rollupDescription = RandomStringUtils.randomAlphanumeric(4);
056    private String generalLedgerTypeDescription = RandomStringUtils.randomAlphanumeric(4);
057    private String glOverridden = RandomStringUtils.randomAlphanumeric(4);
058
059    private Date clearDate = new Date();
060    private String paymentRefundable = RandomStringUtils.randomAlphanumeric(4);
061    private String paymentRefundRule = RandomStringUtils.randomAlphanumeric(4);
062
063    private BigDecimal originalAmount = new BigDecimal(Math.random() * 100, new MathContext(2));
064    private Date defermentExpirationDate = new Date();
065
066    private String chargeCancellationRule = RandomStringUtils.randomAlphanumeric(4);
067
068    private BigDecimal chargeAmount = new BigDecimal(Math.random() * 100, new MathContext(2));
069    private BigDecimal paymentAmount = new BigDecimal(Math.random() * 100, new MathContext(2));
070    private BigDecimal defermentAmount = new BigDecimal(Math.random() * 100, new MathContext(2));
071    private BigDecimal allocatedLockedAllocated = new BigDecimal(Math.random() * 100, new MathContext(2));
072    private BigDecimal unallocatedAmount = new BigDecimal(Math.random() * 100, new MathContext(2));
073
074    private BigDecimal chargeTotal = new BigDecimal(Math.random() * 100, new MathContext(2));
075    private BigDecimal paymentTotal = new BigDecimal(Math.random() * 100, new MathContext(2));
076    private BigDecimal defermentTotal = new BigDecimal(Math.random() * 100, new MathContext(2));
077    private BigDecimal allocatedTotal = new BigDecimal(Math.random() * 100, new MathContext(2));
078    private BigDecimal unallocatedTotal = new BigDecimal(Math.random() * 100, new MathContext(2));
079    private String transactionDisplayType;
080    private String transactionTypeDescription = "Description Description Description";
081
082    private String tagList = "TAG LIST";
083    private String newTag = "NEW TAG";
084
085    private List<TransactionModel> subTransactions;
086    private List<Tag> tagModels = new ArrayList<Tag>();
087
088    public TransactionModel() {
089        this.id = RandomStringUtils.randomAlphanumeric(4);
090        this.accountId = RandomStringUtils.randomAlphanumeric(4);
091        this.transactionDisplayType = "type" + RandomStringUtils.randomNumeric(2);
092    }
093
094    public TransactionModel(int subTransactionsItemNumber) {
095        this();
096        subTransactions = new ArrayList<TransactionModel>();
097        parentTransaction = new TransactionModel();
098        for (int i = 0; i < subTransactionsItemNumber; i++) {
099            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