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 12, 2004
018 *
019 */
020 package org.kuali.kfs.pdp.businessobject;
021
022 import java.util.ArrayList;
023 import java.util.LinkedHashMap;
024 import java.util.List;
025
026 import org.kuali.kfs.coa.businessobject.Account;
027 import org.kuali.kfs.coa.businessobject.Chart;
028 import org.kuali.kfs.coa.businessobject.ObjectCodeCurrent;
029 import org.kuali.kfs.coa.businessobject.ProjectCode;
030 import org.kuali.kfs.coa.businessobject.SubAccount;
031 import org.kuali.kfs.sys.KFSPropertyConstants;
032 import org.kuali.kfs.sys.businessobject.TimestampedBusinessObjectBase;
033 import org.kuali.rice.kns.util.KualiDecimal;
034 import org.kuali.rice.kns.util.KualiInteger;
035
036 public class PaymentAccountDetail extends TimestampedBusinessObjectBase {
037
038 private KualiInteger id; // PMT_ACCT_DTL_ID
039 private String finChartCode; // FIN_COA_CD
040 private String accountNbr; // ACCOUNT_NBR
041 private String subAccountNbr; // SUB_ACCT_NBR
042 private String finObjectCode; // FIN_OBJECT_CD
043 private String finSubObjectCode; // FIN_SUB_OBJ_CD
044 private String orgReferenceId; // ORG_REFERENCE_ID
045 private String projectCode; // PROJECT_CD
046 private KualiDecimal accountNetAmount; // ACCT_NET_AMT
047
048 private KualiInteger paymentDetailId;
049 private PaymentDetail paymentDetail; // PMT_DTL_ID
050
051 private List<PaymentAccountHistory> accountHistory = new ArrayList<PaymentAccountHistory>();
052
053 private Chart chartOfAccounts;
054 private Account account;
055 private SubAccount subAccount;
056 private ProjectCode project;
057 private ObjectCodeCurrent objectCode;
058
059 /**
060 * Constructs a PaymentAccountDetail.java.
061 */
062 public PaymentAccountDetail() {
063 super();
064 }
065
066 /**
067 * This method gets the accountHistory list.
068 *
069 * @return the accountHistory list
070 */
071 public List<PaymentAccountHistory> getAccountHistory() {
072 return accountHistory;
073 }
074
075 /**
076 * This method sets the accountHistory list
077 *
078 * @param ah
079 */
080 public void setAccountHistory(List<PaymentAccountHistory> ah) {
081 accountHistory = ah;
082 }
083
084 /**
085 * This method add a new PaymentAccountHistory.
086 *
087 * @param pah
088 */
089 public void addAccountHistory(PaymentAccountHistory pah) {
090 pah.setPaymentAccountDetail(this);
091 accountHistory.add(pah);
092 }
093
094 /**
095 * This method deletes a PaymentAccountHistory.
096 *
097 * @param pah
098 */
099 public void deleteAccountDetail(PaymentAccountHistory pah) {
100 accountHistory.remove(pah);
101 }
102
103 /**
104 * @hibernate.id column="PMT_ACCT_DTL_ID" generator-class="sequence"
105 * @hibernate.generator-param name="sequence" value="PDP.PDP_PMT_ACCT_DTL_ID_SEQ"
106 * @return
107 */
108 public KualiInteger getId() {
109 return id;
110 }
111
112 /**
113 * @return
114 * @hibernate.many-to-one column="PMT_DTL_ID" class="edu.iu.uis.pdp.bo.PaymentDetail"
115 */
116 public PaymentDetail getPaymentDetail() {
117 return this.paymentDetail;
118 }
119
120 /**
121 * @return
122 * @hibernate.property column="ACCOUNT_NBR" length="7"
123 */
124 public String getAccountNbr() {
125 return accountNbr;
126 }
127
128 /**
129 * @return
130 * @hibernate.property column="ACCT_NET_AMT" length="14"
131 */
132 public KualiDecimal getAccountNetAmount() {
133 return accountNetAmount;
134 }
135
136 /**
137 * @return
138 * @hibernate.property column="FIN_COA_CD" length="2"
139 */
140 public String getFinChartCode() {
141 return finChartCode;
142 }
143
144 /**
145 * @return
146 * @hibernate.property column="FIN_OBJECT_CD" length="4"
147 */
148 public String getFinObjectCode() {
149 return finObjectCode;
150 }
151
152 /**
153 * @return
154 * @hibernate.property column="FIN_SUB_OBJ_CD" length="3"
155 */
156 public String getFinSubObjectCode() {
157 return finSubObjectCode;
158 }
159
160 /**
161 * @return
162 * @hibernate.property column="ORG_REFERENCE_ID" length="8"
163 */
164 public String getOrgReferenceId() {
165 return orgReferenceId;
166 }
167
168 /**
169 * @return
170 * @hibernate.property column="PROJECT_CD" length="10"
171 */
172 public String getProjectCode() {
173 return projectCode;
174 }
175
176 /**
177 * @return
178 * @hibernate.property column="SUB_ACCT_NBR" length="5"
179 */
180 public String getSubAccountNbr() {
181 return subAccountNbr;
182 }
183
184 /**
185 * @param string
186 */
187 public void setAccountNbr(String string) {
188 accountNbr = string;
189 }
190
191 /**
192 * @param string
193 */
194 public void setAccountNetAmount(KualiDecimal bigdecimal) {
195 accountNetAmount = bigdecimal;
196 }
197
198 public void setAccountNetAmount(String bigdecimal) {
199 accountNetAmount = new KualiDecimal(bigdecimal);
200 }
201
202 /**
203 * @param integer
204 */
205 public void setPaymentDetail(PaymentDetail pd) {
206 paymentDetail = pd;
207 }
208
209 /**
210 * @param string
211 */
212 public void setFinChartCode(String string) {
213 finChartCode = string;
214 }
215
216 /**
217 * @param string
218 */
219 public void setFinObjectCode(String string) {
220 finObjectCode = string;
221 }
222
223 /**
224 * @param string
225 */
226 public void setFinSubObjectCode(String string) {
227 finSubObjectCode = string;
228 }
229
230 /**
231 * @param integer
232 */
233 public void setId(KualiInteger integer) {
234 id = integer;
235 }
236
237 /**
238 * @param string
239 */
240 public void setOrgReferenceId(String string) {
241 orgReferenceId = string;
242 }
243
244 /**
245 * @param string
246 */
247 public void setProjectCode(String string) {
248 projectCode = string;
249 }
250
251 /**
252 * @param string
253 */
254 public void setSubAccountNbr(String string) {
255 subAccountNbr = string;
256 }
257
258 /**
259 * Gets the paymentDetailId attribute.
260 *
261 * @return Returns the paymentDetailId.
262 */
263 public KualiInteger getPaymentDetailId() {
264 return paymentDetailId;
265 }
266
267 /**
268 * Sets the paymentDetailId attribute value.
269 *
270 * @param paymentDetailId The paymentDetailId to set.
271 */
272 public void setPaymentDetailId(KualiInteger paymentDetailId) {
273 this.paymentDetailId = paymentDetailId;
274 }
275
276 /**
277 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
278 */
279 @Override
280 protected LinkedHashMap toStringMapper() {
281 LinkedHashMap m = new LinkedHashMap();
282
283 m.put(KFSPropertyConstants.ID, this.id);
284
285 return m;
286 }
287
288 /**
289 * This method gets the account.
290 *
291 * @return the account
292 */
293 public Account getAccount() {
294 return account;
295 }
296
297 /**
298 * This method sets the account.
299 *
300 * @param account
301 */
302 public void setAccount(Account account) {
303 this.account = account;
304 }
305
306 /**
307 * This method gets the subAccount.
308 *
309 * @return the subAccount
310 */
311 public SubAccount getSubAccount() {
312 return subAccount;
313 }
314
315 /**
316 * This method sets the subAccount.
317 *
318 * @param subAccount
319 */
320 public void setSubAccount(SubAccount subAccount) {
321 this.subAccount = subAccount;
322 }
323
324 /**
325 * This method gets the chart of accounts.
326 *
327 * @return the chart of accounts
328 */
329 public Chart getChartOfAccounts() {
330 return chartOfAccounts;
331 }
332
333 /**
334 * This method sets the chart of accounts.
335 *
336 * @param chartOfAccounts
337 */
338 public void setChartOfAccounts(Chart chartOfAccounts) {
339 this.chartOfAccounts = chartOfAccounts;
340 }
341
342 /**
343 * This method gets the project.
344 *
345 * @return the project
346 */
347 public ProjectCode getProject() {
348 return project;
349 }
350
351 /**
352 * This method sets the project.
353 *
354 * @param project
355 */
356 public void setProject(ProjectCode project) {
357 this.project = project;
358 }
359
360 /**
361 * This method gets the cuttent object code.
362 *
363 * @return the current object code
364 */
365 public ObjectCodeCurrent getObjectCode() {
366 return objectCode;
367 }
368
369 /**
370 * This method sets the cuttent object code.
371 *
372 * @param objectCode
373 */
374 public void setObjectCode(ObjectCodeCurrent objectCode) {
375 this.objectCode = objectCode;
376 }
377 }