View Javadoc
1   /*
2    * Copyright 2007 The Kuali Foundation
3    * 
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    * http://www.opensource.org/licenses/ecl2.php
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  /*
17   * Created on Jul 12, 2004
18   *
19   */
20  package org.kuali.ole.pdp.businessobject;
21  
22  import java.util.ArrayList;
23  import java.util.LinkedHashMap;
24  import java.util.List;
25  
26  import org.kuali.ole.coa.businessobject.Account;
27  import org.kuali.ole.coa.businessobject.Chart;
28  import org.kuali.ole.coa.businessobject.ObjectCodeCurrent;
29  import org.kuali.ole.coa.businessobject.ProjectCode;
30  import org.kuali.ole.coa.businessobject.SubAccount;
31  import org.kuali.ole.sys.OLEPropertyConstants;
32  import org.kuali.ole.sys.businessobject.TimestampedBusinessObjectBase;
33  import org.kuali.rice.core.api.util.type.KualiDecimal;
34  import org.kuali.rice.core.api.util.type.KualiInteger;
35  
36  public class PaymentAccountDetail extends TimestampedBusinessObjectBase {
37  
38      private KualiInteger id; // PMT_ACCT_DTL_ID
39      private String finChartCode; // FIN_COA_CD
40      private String accountNbr; // ACCOUNT_NBR
41      private String subAccountNbr; // SUB_ACCT_NBR
42      private String finObjectCode; // FIN_OBJECT_CD
43      private String finSubObjectCode; // FIN_SUB_OBJ_CD
44      private String orgReferenceId; // ORG_REFERENCE_ID
45      private String projectCode; // PROJECT_CD
46      private KualiDecimal accountNetAmount; // ACCT_NET_AMT
47  
48      private KualiInteger paymentDetailId;
49      private PaymentDetail paymentDetail; // PMT_DTL_ID
50  
51      private List<PaymentAccountHistory> accountHistory = new ArrayList<PaymentAccountHistory>();
52  
53      private Chart chartOfAccounts;
54      private Account account;
55      private SubAccount subAccount;
56      private ProjectCode project;
57      private ObjectCodeCurrent objectCode;
58  
59      /**
60       * Constructs a PaymentAccountDetail.java.
61       */
62      public PaymentAccountDetail() {
63          super();
64      }
65  
66      /**
67       * This method gets the accountHistory list.
68       * 
69       * @return the accountHistory list
70       */
71      public List<PaymentAccountHistory> getAccountHistory() {
72          return accountHistory;
73      }
74  
75      /**
76       * This method sets the accountHistory list
77       * 
78       * @param ah
79       */
80      public void setAccountHistory(List<PaymentAccountHistory> ah) {
81          accountHistory = ah;
82      }
83  
84      /**
85       * This method add a new PaymentAccountHistory.
86       * 
87       * @param pah
88       */
89      public void addAccountHistory(PaymentAccountHistory pah) {
90          pah.setPaymentAccountDetail(this);
91          accountHistory.add(pah);
92      }
93  
94      /**
95       * This method deletes a PaymentAccountHistory.
96       * 
97       * @param pah
98       */
99      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.krad.bo.BusinessObjectBase#toStringMapper()
278      */
279     
280     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
281         LinkedHashMap m = new LinkedHashMap();
282 
283         m.put(OLEPropertyConstants.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 }