001/*
002 * Copyright 2007 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 */
016/*
017 * Created on Oct 4, 2004
018 *
019 */
020package org.kuali.ole.pdp.businessobject;
021
022import java.util.Date;
023import java.util.LinkedHashMap;
024import java.util.List;
025
026import org.kuali.ole.pdp.PdpPropertyConstants;
027import org.kuali.rice.core.api.util.type.KualiDecimal;
028import org.kuali.rice.core.api.util.type.KualiInteger;
029import org.kuali.rice.krad.bo.TransientBusinessObjectBase;
030import org.kuali.rice.krad.util.MessageMap;
031
032
033/**
034 * Holds status information for a payment load.
035 */
036public class LoadPaymentStatus extends TransientBusinessObjectBase {
037    public static enum LoadStatus {
038        SUCCESS, FAILURE
039    }
040
041    private int detailCount;
042    private KualiDecimal detailTotal;
043    private String chart;
044    private String unit;
045    private String subUnit;
046    private Date creationDate;
047    private KualiInteger batchId;
048
049    private LoadStatus loadStatus;
050    private List<String> warnings;
051    private MessageMap errorMap;
052
053    public LoadPaymentStatus() {
054        super();
055    }
056
057    public LoadPaymentStatus(List<String> w, int d, KualiDecimal dt) {
058        warnings = w;
059        detailCount = d;
060        detailTotal = dt;
061    }
062
063    /**
064     * Gets the warnings attribute.
065     * 
066     * @return Returns the warnings.
067     */
068    public List<String> getWarnings() {
069        return warnings;
070    }
071
072    /**
073     * Sets the warnings attribute value.
074     * 
075     * @param warnings The warnings to set.
076     */
077    public void setWarnings(List<String> warnings) {
078        this.warnings = warnings;
079    }
080
081    /**
082     * Gets the detailCount attribute.
083     * 
084     * @return Returns the detailCount.
085     */
086    public int getDetailCount() {
087        return detailCount;
088    }
089
090    /**
091     * Sets the detailCount attribute value.
092     * 
093     * @param detailCount The detailCount to set.
094     */
095    public void setDetailCount(int detailCount) {
096        this.detailCount = detailCount;
097    }
098
099    /**
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}