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.util.ArrayList;
22 import java.util.List;
23
24
25
26
27
28
29
30
31 public class TransactionModel implements Serializable {
32 private static final long serialVersionUID = -437696877653987556L;
33 private String id;
34 private Integer chargeAmount;
35 private String transactionDisplayType;
36 private List<TransactionModel> subTransactions = new ArrayList<TransactionModel>();
37
38 public TransactionModel(){
39 this.id = RandomStringUtils.randomAlphanumeric(4);
40 this.chargeAmount = new Integer(RandomStringUtils.randomNumeric(2));
41 this.transactionDisplayType = "type" + RandomStringUtils.randomNumeric(2);
42 }
43
44 public TransactionModel(int subTransactionsItemNumber){
45 this();
46
47 for(int i = 0; i < subTransactionsItemNumber; i++){
48 this.subTransactions.add(new TransactionModel(0));
49 }
50 }
51
52 public Integer getChargeAmount() {
53 return chargeAmount;
54 }
55
56 public void setChargeAmount(Integer chargeAmount) {
57 this.chargeAmount = chargeAmount;
58 }
59
60 public String getId() {
61 return id;
62 }
63
64 public void setId(String id) {
65 this.id = id;
66 }
67
68 public List<TransactionModel> getSubTransactions() {
69 return subTransactions;
70 }
71
72 public void setSubTransactions(List<TransactionModel> subTransactions) {
73 this.subTransactions = subTransactions;
74 }
75
76 public String getTransactionDisplayType() {
77 return transactionDisplayType;
78 }
79
80 public void setTransactionDisplayType(String transactionDisplayType) {
81 this.transactionDisplayType = transactionDisplayType;
82 }
83 }