001 /*
002 * Copyright 2011 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 Jul 8, 2004
018 *
019 */
020 package org.kuali.kfs.pdp.businessobject;
021
022 import java.sql.Timestamp;
023 import java.util.LinkedHashMap;
024
025 import org.kuali.kfs.sys.KFSPropertyConstants;
026 import org.kuali.kfs.sys.businessobject.TimestampedBusinessObjectBase;
027 import org.kuali.kfs.sys.context.SpringContext;
028 import org.kuali.rice.kim.bo.Person;
029 import org.kuali.rice.kns.util.KualiDecimal;
030 import org.kuali.rice.kns.util.KualiInteger;
031
032 public class Batch extends TimestampedBusinessObjectBase {
033 private KualiInteger id;
034 private KualiInteger customerId;
035 private String paymentFileName;
036 private Timestamp customerFileCreateTimestamp;
037 private KualiInteger paymentCount;
038 private KualiDecimal paymentTotalAmount;
039 private String submiterUserId;
040 private Timestamp fileProcessTimestamp;
041
042 private CustomerProfile customerProfile;
043 private Person submiterUser;
044
045 public Batch() {
046 super();
047 }
048
049 public Timestamp getFileProcessTimestamp() {
050 return fileProcessTimestamp;
051 }
052
053 /**
054 * @return
055 */
056 public KualiInteger getId() {
057 return id;
058 }
059
060 /**
061 * @return
062 */
063 public Timestamp getCustomerFileCreateTimestamp() {
064 return customerFileCreateTimestamp;
065 }
066
067 /**
068 * @return
069 */
070 public KualiInteger getPaymentCount() {
071 return paymentCount;
072 }
073
074 /**
075 * @return
076 */
077 public String getPaymentFileName() {
078 return paymentFileName;
079 }
080
081 /**
082 * @return
083 */
084 public KualiDecimal getPaymentTotalAmount() {
085 return paymentTotalAmount;
086 }
087
088 /**
089 * @return
090 */
091 public CustomerProfile getCustomerProfile() {
092 return customerProfile;
093 }
094
095 /**
096 * @param string
097 */
098 public void setCustomerFileCreateTimestamp(Timestamp t) {
099 customerFileCreateTimestamp = t;
100 }
101
102 /**
103 * @param timestamp
104 */
105 public void setFileProcessTimestamp(Timestamp timestamp) {
106 fileProcessTimestamp = timestamp;
107 }
108
109 /**
110 * @param integer
111 */
112 public void setId(KualiInteger integer) {
113 id = integer;
114 }
115
116 /**
117 * @param integer
118 */
119 public void setPaymentCount(KualiInteger integer) {
120 paymentCount = integer;
121 }
122
123 /**
124 * @param string
125 */
126 public void setPaymentFileName(String string) {
127 paymentFileName = string;
128 }
129
130 /**
131 * @param decimal
132 */
133 public void setPaymentTotalAmount(KualiDecimal decimal) {
134 paymentTotalAmount = decimal;
135 }
136
137 /**
138 * @param integer
139 */
140 public void setCustomerProfile(CustomerProfile cp) {
141 customerProfile = cp;
142 }
143
144 public Person getSubmiterUser() {
145 submiterUser = SpringContext.getBean(org.kuali.rice.kim.service.PersonService.class).updatePersonIfNecessary(submiterUserId, submiterUser);
146 return submiterUser;
147 }
148
149 public void setSubmiterUser(Person s) {
150 this.submiterUser = s;
151 }
152
153 /**
154 * @return Returns the submiterUserId.
155 */
156 public String getSubmiterUserId() {
157 return submiterUserId;
158 }
159
160 /**
161 * @param submiterUserId The submiterUserId to set.
162 */
163 public void setSubmiterUserId(String submiterUserId) {
164 this.submiterUserId = submiterUserId;
165 }
166
167 /**
168 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
169 */
170 @Override
171 protected LinkedHashMap toStringMapper() {
172 LinkedHashMap m = new LinkedHashMap();
173
174 m.put(KFSPropertyConstants.ID, this.id);
175
176 return m;
177 }
178
179 }
180