View Javadoc
1   /*
2    * Copyright 2007 The Kuali Foundation
3    * 
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    * http://www.opensource.org/licenses/ecl2.php
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  /*
17   * Created on Oct 4, 2004
18   *
19   */
20  package org.kuali.ole.pdp.businessobject;
21  
22  import java.util.Date;
23  import java.util.LinkedHashMap;
24  import java.util.List;
25  
26  import org.kuali.ole.pdp.PdpPropertyConstants;
27  import org.kuali.rice.core.api.util.type.KualiDecimal;
28  import org.kuali.rice.core.api.util.type.KualiInteger;
29  import org.kuali.rice.krad.bo.TransientBusinessObjectBase;
30  import org.kuali.rice.krad.util.MessageMap;
31  
32  
33  /**
34   * Holds status information for a payment load.
35   */
36  public class LoadPaymentStatus extends TransientBusinessObjectBase {
37      public static enum LoadStatus {
38          SUCCESS, FAILURE
39      }
40  
41      private int detailCount;
42      private KualiDecimal detailTotal;
43      private String chart;
44      private String unit;
45      private String subUnit;
46      private Date creationDate;
47      private KualiInteger batchId;
48  
49      private LoadStatus loadStatus;
50      private List<String> warnings;
51      private MessageMap errorMap;
52  
53      public LoadPaymentStatus() {
54          super();
55      }
56  
57      public LoadPaymentStatus(List<String> w, int d, KualiDecimal dt) {
58          warnings = w;
59          detailCount = d;
60          detailTotal = dt;
61      }
62  
63      /**
64       * Gets the warnings attribute.
65       * 
66       * @return Returns the warnings.
67       */
68      public List<String> getWarnings() {
69          return warnings;
70      }
71  
72      /**
73       * Sets the warnings attribute value.
74       * 
75       * @param warnings The warnings to set.
76       */
77      public void setWarnings(List<String> warnings) {
78          this.warnings = warnings;
79      }
80  
81      /**
82       * Gets the detailCount attribute.
83       * 
84       * @return Returns the detailCount.
85       */
86      public int getDetailCount() {
87          return detailCount;
88      }
89  
90      /**
91       * Sets the detailCount attribute value.
92       * 
93       * @param detailCount The detailCount to set.
94       */
95      public void setDetailCount(int detailCount) {
96          this.detailCount = detailCount;
97      }
98  
99      /**
100      * Gets the detailTotal attribute.
101      * 
102      * @return Returns the detailTotal.
103      */
104     public KualiDecimal getDetailTotal() {
105         return detailTotal;
106     }
107 
108     /**
109      * Sets the detailTotal attribute value.
110      * 
111      * @param detailTotal The detailTotal to set.
112      */
113     public void setDetailTotal(KualiDecimal detailTotal) {
114         this.detailTotal = detailTotal;
115     }
116 
117     /**
118      * Gets the batchId attribute.
119      * 
120      * @return Returns the batchId.
121      */
122     public KualiInteger getBatchId() {
123         return batchId;
124     }
125 
126     /**
127      * Sets the batchId attribute value.
128      * 
129      * @param batchId The batchId to set.
130      */
131     public void setBatchId(KualiInteger batchId) {
132         this.batchId = batchId;
133     }
134 
135     /**
136      * Gets the loadStatus attribute.
137      * 
138      * @return Returns the loadStatus.
139      */
140     public LoadStatus getLoadStatus() {
141         return loadStatus;
142     }
143 
144     /**
145      * Sets the loadStatus attribute value.
146      * 
147      * @param loadStatus The loadStatus to set.
148      */
149     public void setLoadStatus(LoadStatus loadStatus) {
150         this.loadStatus = loadStatus;
151     }
152 
153     /**
154      * Gets the errorMap attribute.
155      * 
156      * @return Returns the errorMap.
157      */
158     public MessageMap getMessageMap() {
159         return errorMap;
160     }
161 
162     /**
163      * Sets the errorMap attribute value.
164      * 
165      * @param errorMap The errorMap to set.
166      */
167     public void setMessageMap(MessageMap errorMap) {
168         this.errorMap = errorMap;
169     }
170 
171     /**
172      * Gets the chart attribute.
173      * 
174      * @return Returns the chart.
175      */
176     public String getChart() {
177         return chart;
178     }
179 
180     /**
181      * Sets the chart attribute value.
182      * 
183      * @param chart The chart to set.
184      */
185     public void setChart(String chart) {
186         this.chart = chart;
187     }
188 
189     /**
190      * Gets the unit attribute.
191      * 
192      * @return Returns the unit.
193      */
194     public String getUnit() {
195         return unit;
196     }
197 
198     /**
199      * Sets the unit attribute value.
200      * 
201      * @param unit The unit to set.
202      */
203     public void setUnit(String unit) {
204         this.unit = unit;
205     }
206 
207     /**
208      * Gets the subUnit attribute.
209      * 
210      * @return Returns the subUnit.
211      */
212     public String getSubUnit() {
213         return subUnit;
214     }
215 
216     /**
217      * Sets the subUnit attribute value.
218      * 
219      * @param subUnit The subUnit to set.
220      */
221     public void setSubUnit(String subUnit) {
222         this.subUnit = subUnit;
223     }
224 
225     /**
226      * Gets the creationDate attribute.
227      * 
228      * @return Returns the creationDate.
229      */
230     public Date getCreationDate() {
231         return creationDate;
232     }
233 
234     /**
235      * Sets the creationDate attribute value.
236      * 
237      * @param creationDate The creationDate to set.
238      */
239     public void setCreationDate(Date creationDate) {
240         this.creationDate = creationDate;
241     }
242 
243     
244     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
245         LinkedHashMap m = new LinkedHashMap();
246         m.put(PdpPropertyConstants.DETAIL_COUNT, this.detailCount);
247         m.put(PdpPropertyConstants.BATCH_ID, this.batchId);
248 
249         return m;
250     }
251 }