View Javadoc
1   /*
2    * Copyright 2006 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  package org.kuali.ole.coa.businessobject;
18  
19  import java.util.ArrayList;
20  import java.util.Collection;
21  import java.util.List;
22  
23  import org.kuali.rice.krad.bo.PersistableBusinessObject;
24  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
25  
26  /**
27   * 
28   */
29  public class A21SubAccount extends PersistableBusinessObjectBase {
30  
31      private static final long serialVersionUID = 2983753447370117974L;
32  
33      protected String chartOfAccountsCode;
34      protected String accountNumber;
35      protected String subAccountNumber;
36      protected String subAccountTypeCode;
37      protected String indirectCostRecoveryTypeCode;
38      protected String financialIcrSeriesIdentifier;
39      protected boolean offCampusCode;
40      protected String costShareChartOfAccountCode;
41      protected String costShareSourceAccountNumber;
42      protected String costShareSourceSubAccountNumber;
43  
44      protected Chart costShareChartOfAccount;
45      protected Account costShareAccount;
46      protected SubAccount costShareSourceSubAccount;
47      protected IndirectCostRecoveryType indirectCostRecoveryType;
48      protected Chart chartOfAccounts;
49      protected Account account;
50      
51      protected List<A21IndirectCostRecoveryAccount> a21IndirectCostRecoveryAccounts;
52  
53      /**
54       * 
55       */
56      public A21SubAccount() {
57          super();
58          a21IndirectCostRecoveryAccounts = new ArrayList<A21IndirectCostRecoveryAccount>();
59      }
60  
61      /**
62       * Gets the serialVersionUID attribute.
63       * 
64       * @return Returns the serialVersionUID.
65       */
66      public static long getSerialVersionUID() {
67          return serialVersionUID;
68      }
69  
70      /**
71       * Gets the accountNumber attribute.
72       * 
73       * @return Returns the accountNumber.
74       */
75      public String getAccountNumber() {
76          return accountNumber;
77      }
78  
79      /**
80       * Sets the accountNumber attribute value.
81       * 
82       * @param accountNumber The accountNumber to set.
83       */
84      public void setAccountNumber(String accountNumber) {
85          this.accountNumber = accountNumber;
86      }
87  
88      /**
89       * Gets the chartOfAccountsCode attribute.
90       * 
91       * @return Returns the chartOfAccountsCode.
92       */
93      public String getChartOfAccountsCode() {
94          return chartOfAccountsCode;
95      }
96  
97      /**
98       * Sets the chartOfAccountsCode attribute value.
99       * 
100      * @param chartOfAccountsCode The chartOfAccountsCode to set.
101      */
102     public void setChartOfAccountsCode(String chartOfAccountsCode) {
103         this.chartOfAccountsCode = chartOfAccountsCode;
104     }
105 
106     /**
107      * Gets the indirectCostRecoveryType attribute.
108      * 
109      * @return Returns the indirectCostRecoveryType.
110      */
111     public IndirectCostRecoveryType getIndirectCostRecoveryType() {
112         return indirectCostRecoveryType;
113     }
114 
115     /**
116      * Sets the indirectCostRecoveryType attribute value.
117      * 
118      * @param indirectCostRecoveryType The indirectCostRecoveryType to set.
119      */
120     public void setIndirectCostRecoveryType(IndirectCostRecoveryType icrTypeCode) {
121         this.indirectCostRecoveryType = icrTypeCode;
122     }
123 
124     /**
125      * Gets the indirectCostRecoveryTypeCode attribute.
126      * 
127      * @return Returns the indirectCostRecoveryTypeCode.
128      */
129     public String getIndirectCostRecoveryTypeCode() {
130         return indirectCostRecoveryTypeCode;
131     }
132 
133     /**
134      * Sets the indirectCostRecoveryTypeCode attribute value.
135      * 
136      * @param indirectCostRecoveryTypeCode The indirectCostRecoveryTypeCode to set.
137      */
138     public void setIndirectCostRecoveryTypeCode(String indirectCostRecoveryTypeCode) {
139         this.indirectCostRecoveryTypeCode = indirectCostRecoveryTypeCode;
140     }
141 
142     /**
143      * Gets the financialIcrSeriesIdentifier attribute.
144      * 
145      * @return Returns the financialIcrSeriesIdentifier.
146      */
147     public String getFinancialIcrSeriesIdentifier() {
148         return financialIcrSeriesIdentifier;
149     }
150 
151     /**
152      * Sets the financialIcrSeriesIdentifier attribute value.
153      * 
154      * @param financialIcrSeriesIdentifier The financialIcrSeriesIdentifier to set.
155      */
156     public void setFinancialIcrSeriesIdentifier(String financialIcrSeriesIdentifier) {
157         this.financialIcrSeriesIdentifier = financialIcrSeriesIdentifier;
158     }
159 
160     /**
161      * Gets the subAccountNumber attribute.
162      * 
163      * @return Returns the subAccountNumber.
164      */
165     public String getSubAccountNumber() {
166         return subAccountNumber;
167     }
168 
169     /**
170      * Sets the subAccountNumber attribute value.
171      * 
172      * @param subAccountNumber The subAccountNumber to set.
173      */
174     public void setSubAccountNumber(String subAccountNumber) {
175         this.subAccountNumber = subAccountNumber;
176     }
177 
178     /**
179      * Gets the subAccountTypeCode attribute.
180      * 
181      * @return Returns the subAccountTypeCode.
182      */
183     public String getSubAccountTypeCode() {
184         return subAccountTypeCode;
185     }
186 
187     /**
188      * Sets the subAccountTypeCode attribute value.
189      * 
190      * @param subAccountTypeCode The subAccountTypeCode to set.
191      */
192     public void setSubAccountTypeCode(String subAccountTypeCode) {
193         this.subAccountTypeCode = subAccountTypeCode;
194     }
195 
196     /**
197      * Gets the costShareAccount attribute.
198      * 
199      * @return Returns the costShareAccount.
200      */
201     public Account getCostShareAccount() {
202         return costShareAccount;
203     }
204 
205     /**
206      * Sets the costShareAccount attribute value.
207      * 
208      * @param costShareAccount The costShareAccount to set.
209      */
210     public void setCostShareAccount(Account costShareAccount) {
211         this.costShareAccount = costShareAccount;
212     }
213 
214     /**
215      * Gets the costShareChartOfAccount attribute.
216      * 
217      * @return Returns the costShareChartOfAccount.
218      */
219     public Chart getCostShareChartOfAccount() {
220         return costShareChartOfAccount;
221     }
222 
223     /**
224      * Sets the costShareChartOfAccount attribute value.
225      * 
226      * @param costShareChartOfAccount The costShareChartOfAccount to set.
227      */
228     public void setCostShareChartOfAccount(Chart costShareChartOfAccount) {
229         this.costShareChartOfAccount = costShareChartOfAccount;
230     }
231 
232     /**
233      * Gets the costShareChartOfAccountCode attribute.
234      * 
235      * @return Returns the costShareChartOfAccountCode.
236      */
237     public String getCostShareChartOfAccountCode() {
238         return costShareChartOfAccountCode;
239     }
240 
241     /**
242      * Sets the costShareChartOfAccountCode attribute value.
243      * 
244      * @param costShareChartOfAccountCode The costShareChartOfAccountCode to set.
245      */
246     public void setCostShareChartOfAccountCode(String costShareChartOfAccountCode) {
247         this.costShareChartOfAccountCode = costShareChartOfAccountCode;
248     }
249 
250     /**
251      * Gets the costShareSourceAccountNumber attribute.
252      * 
253      * @return Returns the costShareSourceAccountNumber.
254      */
255     public String getCostShareSourceAccountNumber() {
256         return costShareSourceAccountNumber;
257     }
258 
259     /**
260      * Sets the costShareSourceAccountNumber attribute value.
261      * 
262      * @param costShareSourceAccountNumber The costShareSourceAccountNumber to set.
263      */
264     public void setCostShareSourceAccountNumber(String costShareSourceAccountNumber) {
265         this.costShareSourceAccountNumber = costShareSourceAccountNumber;
266     }
267 
268     /**
269      * Gets the costShareSourceSubAccount attribute.
270      * 
271      * @return Returns the costShareSourceSubAccount.
272      */
273     public SubAccount getCostShareSourceSubAccount() {
274         return costShareSourceSubAccount;
275     }
276 
277     /**
278      * Sets the costShareSourceSubAccount attribute value.
279      * 
280      * @param costShareSourceSubAccount The costShareSourceSubAccount to set.
281      */
282     public void setCostShareSourceSubAccount(SubAccount costShareSourceSubAccount) {
283         this.costShareSourceSubAccount = costShareSourceSubAccount;
284     }
285 
286     /**
287      * Gets the costShareSourceSubAccountNumber attribute.
288      * 
289      * @return Returns the costShareSourceSubAccountNumber.
290      */
291     public String getCostShareSourceSubAccountNumber() {
292         return costShareSourceSubAccountNumber;
293     }
294 
295     /**
296      * Sets the costShareSourceSubAccountNumber attribute value.
297      * 
298      * @param costShareSourceSubAccountNumber The costShareSourceSubAccountNumber to set.
299      */
300     public void setCostShareSourceSubAccountNumber(String costShareSourceSubAccountNumber) {
301         this.costShareSourceSubAccountNumber = costShareSourceSubAccountNumber;
302     }
303 
304     /**
305      * Gets the offCampusCode attribute.
306      * 
307      * @return Returns the offCampusCode.
308      */
309     public boolean getOffCampusCode() {
310         return offCampusCode;
311     }
312 
313     /**
314      * Sets the offCampusCode attribute value.
315      * 
316      * @param offCampusCode The offCampusCode to set.
317      */
318     public void setOffCampusCode(boolean offCampusCode) {
319         this.offCampusCode = offCampusCode;
320     }
321 
322     /**
323      * Gets the account attribute.
324      * 
325      * @return Returns the account.
326      */
327     public Account getAccount() {
328         return account;
329     }
330 
331     /**
332      * Sets the account attribute value.
333      * 
334      * @param account The account to set.
335      * @deprecated
336      */
337     public void setAccount(Account account) {
338         this.account = account;
339     }
340 
341     /**
342      * Gets the chartOfAccounts attribute.
343      * 
344      * @return Returns the chartOfAccounts.
345      */
346     public Chart getChartOfAccounts() {
347         return chartOfAccounts;
348     }
349 
350     /**
351      * Sets the chartOfAccounts attribute value.
352      * 
353      * @param chartOfAccounts The chartOfAccounts to set.
354      * @deprecated
355      */
356     public void setChartOfAccounts(Chart chartOfAccounts) {
357         this.chartOfAccounts = chartOfAccounts;
358     }
359 
360     public List<A21IndirectCostRecoveryAccount> getA21IndirectCostRecoveryAccounts() {
361         return a21IndirectCostRecoveryAccounts;
362     }
363 
364     public List<A21IndirectCostRecoveryAccount> getA21ActiveIndirectCostRecoveryAccounts() {
365         List<A21IndirectCostRecoveryAccount> activeList = new ArrayList<A21IndirectCostRecoveryAccount>();
366         for (A21IndirectCostRecoveryAccount icr : getA21IndirectCostRecoveryAccounts()){
367             if (icr.isActive()){
368                 activeList.add(A21IndirectCostRecoveryAccount.copyICRAccount(icr));
369             }
370         }
371         return activeList;
372     }
373     
374     public void setA21IndirectCostRecoveryAccounts(List<A21IndirectCostRecoveryAccount> a21IndirectCostRecoveryAccounts) {
375         this.a21IndirectCostRecoveryAccounts = a21IndirectCostRecoveryAccounts;
376     }
377 
378     /**
379      * @see org.kuali.rice.krad.bo.PersistableBusinessObjectBase#buildListOfDeletionAwareLists()
380      */
381     @Override
382     public List buildListOfDeletionAwareLists() {
383         List<Collection<PersistableBusinessObject>> managedLists = super.buildListOfDeletionAwareLists();
384         managedLists.add( new ArrayList<PersistableBusinessObject>( getA21IndirectCostRecoveryAccounts() ) );
385         return managedLists;
386     }
387 
388 }