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