View Javadoc

1   package org.kuali.student.enrollment.lpr.dto;
2   
3   import java.io.Serializable;
4   import java.util.ArrayList;
5   import java.util.List;
6   
7   import javax.xml.bind.annotation.XmlAccessType;
8   import javax.xml.bind.annotation.XmlAccessorType;
9   import javax.xml.bind.annotation.XmlAnyElement;
10  import javax.xml.bind.annotation.XmlElement;
11  import javax.xml.bind.annotation.XmlType;
12  
13  import org.kuali.student.enrollment.lpr.infc.LprTransaction;
14  import org.kuali.student.enrollment.lpr.infc.LprTransactionItem;
15  import org.kuali.student.r2.common.dto.IdEntityInfo;
16  import org.w3c.dom.Element;
17  
18  /**
19   * @author Kuali Student Team (sambit)
20   */
21  @XmlAccessorType(XmlAccessType.FIELD)
22  @XmlType(name = "LprTransactionInfo", propOrder = {"id",
23      "typeKey",
24      "stateKey",
25      "name",
26      "descr",
27      "requestingPersonId",
28      "atpId",
29      "lprTransactionItems",
30      "meta",
31      "attributes",
32      "_futureElements"})
33  public class LprTransactionInfo extends IdEntityInfo implements LprTransaction, Serializable {
34  
35      private static final long serialVersionUID = 1L;
36      @XmlElement
37      private String requestingPersonId;
38      @XmlElement
39      private String atpId;
40      @XmlElement
41      private List<LprTransactionItemInfo> lprTransactionItems;
42      @XmlAnyElement
43      private List<Element> _futureElements;
44  
45      public LprTransactionInfo() {
46      }
47  
48      public LprTransactionInfo(LprTransaction input) {
49          super(input);
50          if (input == null) {
51              return;
52          }
53          this.requestingPersonId = input.getRequestingPersonId();
54          this.atpId = input.getAtpId();
55          this.lprTransactionItems = new ArrayList<LprTransactionItemInfo>();
56          if (input.getLprTransactionItems() != null) {
57              for (LprTransactionItem item : input.getLprTransactionItems()) {
58                  this.lprTransactionItems.add(new LprTransactionItemInfo(item));
59              }
60          }
61      }
62  
63      @Override
64      public List<LprTransactionItemInfo> getLprTransactionItems() {
65          if (this.lprTransactionItems == null) {
66              this.lprTransactionItems = new ArrayList<LprTransactionItemInfo>();
67          }
68          return lprTransactionItems;
69      }
70  
71      public void setLprTransactionItems(List<LprTransactionItemInfo> lprTransactionItems) {
72          this.lprTransactionItems = lprTransactionItems;
73      }
74  
75      @Override
76      public String getRequestingPersonId() {
77          return requestingPersonId;
78      }
79  
80      public void setRequestingPersonId(String requestingPersonId) {
81          this.requestingPersonId = requestingPersonId;
82      }
83  
84      @Override
85      public String getAtpId() {
86          return atpId;
87      }
88  
89      public void setAtpId(String atpId) {
90          this.atpId = atpId;
91      }
92  
93  	@Override
94  	public String toString() {
95  		StringBuilder builder = new StringBuilder();
96  		builder.append("LprTransactionInfo [id()=");
97  		builder.append(getId());
98  		builder.append(", type()=");
99  		builder.append(getTypeKey());
100 		builder.append(", state()=");
101 		builder.append(getStateKey());
102 		builder.append(", requestingPersonId=");
103 		builder.append(requestingPersonId);
104 		builder.append(", atpId=");
105 		builder.append(atpId);
106 		builder.append("]");
107 		return builder.toString();
108 	}
109     
110     
111 }