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: /*
017: * Created on Aug 19, 2004
018: *
019: */
020: package org.kuali.module.pdp.bo;
021:
022: import java.io.Serializable;
023: import java.math.BigDecimal;
024: import java.sql.Timestamp;
025: import java.util.Date;
026:
027: import org.apache.commons.lang.builder.EqualsBuilder;
028: import org.apache.commons.lang.builder.HashCodeBuilder;
029: import org.apache.commons.lang.builder.ToStringBuilder;
030: import org.apache.ojb.broker.PersistenceBroker;
031: import org.apache.ojb.broker.PersistenceBrokerAware;
032: import org.apache.ojb.broker.PersistenceBrokerException;
033:
034: /**
035: * @author jsissom
036: */
037: public class ProcessSummary implements Serializable,
038: PersistenceBrokerAware {
039: private Integer id;
040: private Integer customerId;
041: private String disbursementTypeCode;
042: private Integer processId;
043: private String sortGroupId;
044: private Integer beginDisbursementNbr;
045: private Integer endDisbursementNbr;
046: private BigDecimal processTotalAmount;
047: private Integer processTotalCount;
048: private Integer version;
049: private DisbursementType disbursementType;
050: private PaymentProcess process;
051: private CustomerProfile customer;
052: private Timestamp lastUpdate;
053:
054: public ProcessSummary() {
055: }
056:
057: public String getSortGroupId() {
058: return sortGroupId;
059: }
060:
061: public void setSortGroupId(String sortGroupId) {
062: this .sortGroupId = sortGroupId;
063: }
064:
065: public String getSortGroupName() {
066: if ("B".equals(sortGroupId)) {
067: return "Immediate";
068: } else if ("C".equals(sortGroupId)) {
069: return "Special Handling";
070: } else if ("D".equals(sortGroupId)) {
071: return "Attachment";
072: } else {
073: return "Other";
074: }
075: }
076:
077: public Integer getBeginDisbursementNbr() {
078: return beginDisbursementNbr;
079: }
080:
081: public void setBeginDisbursementNbr(Integer beginDisbursementNbr) {
082: this .beginDisbursementNbr = beginDisbursementNbr;
083: }
084:
085: public CustomerProfile getCustomer() {
086: return customer;
087: }
088:
089: public void setCustomer(CustomerProfile customer) {
090: this .customer = customer;
091: }
092:
093: public DisbursementType getDisbursementType() {
094: return disbursementType;
095: }
096:
097: public void setDisbursementType(DisbursementType disbursementType) {
098: this .disbursementType = disbursementType;
099: }
100:
101: public Integer getEndDisbursementNbr() {
102: return endDisbursementNbr;
103: }
104:
105: public void setEndDisbursementNbr(Integer endDisbursementNbr) {
106: this .endDisbursementNbr = endDisbursementNbr;
107: }
108:
109: public Integer getId() {
110: return id;
111: }
112:
113: public void setId(Integer id) {
114: this .id = id;
115: }
116:
117: public PaymentProcess getProcess() {
118: return process;
119: }
120:
121: public void setProcess(PaymentProcess process) {
122: this .process = process;
123: }
124:
125: public BigDecimal getProcessTotalAmount() {
126: return processTotalAmount;
127: }
128:
129: public void setProcessTotalAmount(BigDecimal processTotalAmount) {
130: this .processTotalAmount = processTotalAmount;
131: }
132:
133: public Integer getProcessTotalCount() {
134: return processTotalCount;
135: }
136:
137: public void setProcessTotalCount(Integer processTotalCount) {
138: this .processTotalCount = processTotalCount;
139: }
140:
141: public Integer getVersion() {
142: return version;
143: }
144:
145: public void setVersion(Integer version) {
146: this .version = version;
147: }
148:
149: public boolean equals(Object obj) {
150: if (!(obj instanceof PaymentProcess)) {
151: return false;
152: }
153: PaymentProcess tc = (PaymentProcess) obj;
154: return new EqualsBuilder().append(id, tc.getId()).isEquals();
155: }
156:
157: public int hashCode() {
158: return new HashCodeBuilder(67, 5).append(id).toHashCode();
159: }
160:
161: public String toString() {
162: return new ToStringBuilder(this ).append("id", this .id)
163: .toString();
164: }
165:
166: /**
167: * @return Returns the lastUpdate.
168: */
169: public Timestamp getLastUpdate() {
170: return lastUpdate;
171: }
172:
173: /**
174: * @param lastUpdate The lastUpdate to set.
175: */
176: public void setLastUpdate(Timestamp lastUpdate) {
177: this .lastUpdate = lastUpdate;
178: }
179:
180: public void beforeInsert(PersistenceBroker broker)
181: throws PersistenceBrokerException {
182: lastUpdate = new Timestamp((new Date()).getTime());
183: }
184:
185: public void afterInsert(PersistenceBroker broker)
186: throws PersistenceBrokerException {
187:
188: }
189:
190: public void beforeUpdate(PersistenceBroker broker)
191: throws PersistenceBrokerException {
192: lastUpdate = new Timestamp((new Date()).getTime());
193: }
194:
195: public void afterUpdate(PersistenceBroker broker)
196: throws PersistenceBrokerException {
197:
198: }
199:
200: public void beforeDelete(PersistenceBroker broker)
201: throws PersistenceBrokerException {
202:
203: }
204:
205: public void afterDelete(PersistenceBroker broker)
206: throws PersistenceBrokerException {
207:
208: }
209:
210: public void afterLookup(PersistenceBroker broker)
211: throws PersistenceBrokerException {
212:
213: }
214:
215: }
|