001: /*
002: * Copyright 2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.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/ecl1.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: package org.kuali.module.financial.bo;
017:
018: import java.sql.Date;
019: import java.util.LinkedHashMap;
020:
021: import org.kuali.core.bo.PersistableBusinessObjectBase;
022: import org.kuali.core.util.KualiDecimal;
023:
024: /**
025: * This class represents in a cashiering item in process. This cashiering item in process
026: * has an item amount, reduced amount, and remaining amount. It also has a closed and open date.
027: */
028: public class CashieringItemInProcess extends
029: PersistableBusinessObjectBase {
030:
031: private String workgroupName;
032: private Integer itemIdentifier;
033: private KualiDecimal itemAmount;
034: private KualiDecimal itemReducedAmount;
035: private KualiDecimal itemRemainingAmount;
036: private KualiDecimal currentPayment;
037: private Date itemOpenDate;
038: private Date itemClosedDate;
039: private String itemDescription;
040:
041: /**
042: * Default constructor.
043: */
044: public CashieringItemInProcess() {
045: }
046:
047: /**
048: * Gets the workgroupName attribute.
049: *
050: * @return Returns the workgroupName
051: */
052: public String getWorkgroupName() {
053: return workgroupName;
054: }
055:
056: /**
057: * Sets the workgroupName attribute.
058: *
059: * @param workgroupName The workgroupName to set.
060: */
061: public void setWorkgroupName(String workgroupName) {
062: this .workgroupName = workgroupName;
063: }
064:
065: /**
066: * Gets the itemIdentifier attribute.
067: *
068: * @return Returns the itemIdentifier
069: */
070: public Integer getItemIdentifier() {
071: return itemIdentifier;
072: }
073:
074: /**
075: * Sets the itemIdentifier attribute.
076: *
077: * @param itemIdentifier The itemIdentifier to set.
078: */
079: public void setItemIdentifier(Integer itemIdentifier) {
080: this .itemIdentifier = itemIdentifier;
081: }
082:
083: /**
084: * Gets the itemAmount attribute.
085: *
086: * @return Returns the itemAmount
087: */
088: public KualiDecimal getItemAmount() {
089: return itemAmount;
090: }
091:
092: /**
093: * Sets the itemAmount attribute.
094: *
095: * @param itemAmount The itemAmount to set.
096: */
097: public void setItemAmount(KualiDecimal itemAmount) {
098: this .itemAmount = itemAmount;
099: }
100:
101: /**
102: * Gets the itemReducedAmount attribute.
103: *
104: * @return Returns the itemReducedAmount
105: */
106: public KualiDecimal getItemReducedAmount() {
107: return itemReducedAmount;
108: }
109:
110: /**
111: * Sets the itemReducedAmount attribute.
112: *
113: * @param itemReducedAmount The itemReducedAmount to set.
114: */
115: public void setItemReducedAmount(KualiDecimal itemReducedAmount) {
116: this .itemReducedAmount = itemReducedAmount;
117: }
118:
119: /**
120: * Gets the itemRemainingAmount attribute.
121: *
122: * @return Returns the itemRemainingAmount
123: */
124: public KualiDecimal getItemRemainingAmount() {
125: return itemRemainingAmount;
126: }
127:
128: /**
129: * Sets the itemRemainingAmount attribute.
130: *
131: * @param itemRemainingAmount The itemRemainingAmount to set.
132: */
133: public void setItemRemainingAmount(KualiDecimal itemTotalAmount) {
134: this .itemRemainingAmount = itemTotalAmount;
135: }
136:
137: /**
138: * Gets the itemOpenDate attribute.
139: *
140: * @return Returns the itemOpenDate
141: */
142: public Date getItemOpenDate() {
143: return itemOpenDate;
144: }
145:
146: /**
147: * Sets the itemOpenDate attribute.
148: *
149: * @param itemOpenDate The itemOpenDate to set.
150: */
151: public void setItemOpenDate(Date itemOpenDate) {
152: this .itemOpenDate = itemOpenDate;
153: }
154:
155: /**
156: * Gets the itemClosedDate attribute.
157: *
158: * @return Returns the itemClosedDate
159: */
160: public Date getItemClosedDate() {
161: return itemClosedDate;
162: }
163:
164: /**
165: * Sets the itemClosedDate attribute.
166: *
167: * @param itemClosedDate The itemClosedDate to set.
168: */
169: public void setItemClosedDate(Date itemClosedDate) {
170: this .itemClosedDate = itemClosedDate;
171: }
172:
173: /**
174: * Gets the itemDescription attribute.
175: *
176: * @return Returns the itemDescription
177: */
178: public String getItemDescription() {
179: return itemDescription;
180: }
181:
182: /**
183: * Sets the itemDescription attribute.
184: *
185: * @param itemDescription The itemDescription to set.
186: */
187: public void setItemDescription(String itemDescription) {
188: this .itemDescription = itemDescription;
189: }
190:
191: /**
192: * Gets the currentPayment attribute.
193: *
194: * @return Returns the currentPayment.
195: */
196: public KualiDecimal getCurrentPayment() {
197: return currentPayment;
198: }
199:
200: /**
201: * Sets the currentPayment attribute value.
202: *
203: * @param currentPayment The currentPayment to set.
204: */
205: public void setCurrentPayment(KualiDecimal currentPayment) {
206: this .currentPayment = currentPayment;
207: }
208:
209: /**
210: * @see org.kuali.core.bo.BusinessObjectBase#toStringMapper()
211: */
212: protected LinkedHashMap toStringMapper() {
213: LinkedHashMap m = new LinkedHashMap();
214: m.put("workgroupName", this .workgroupName);
215: if (this .itemIdentifier != null) {
216: m.put("itemIdentifier", this .itemIdentifier.toString());
217: }
218: return m;
219: }
220:
221: /**
222: * This method determines if this cashiering item in process was likely filled in by someone Since workgroupName is likely
223: * automatically populated, it doesn't count
224: *
225: * @return if this item in process is populated
226: */
227: public boolean isPopulated() {
228: return (this.itemOpenDate != null && itemAmount != null && !itemAmount
229: .equals(KualiDecimal.ZERO));
230: }
231: }
|