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  package org.kuali.ole.module.purap.util;
17  
18  /**
19   * Expired or Closed Account
20   */
21  public class ExpiredOrClosedAccount {
22  
23      private String chartOfAccountsCode;
24      private String accountNumber;
25      private String subAccountNumber;
26      private boolean closedIndicator;
27      private boolean expiredIndicator;
28      private boolean continuationAccountMissing;
29  
30      /**
31       * Default constructor
32       */
33      public ExpiredOrClosedAccount() {
34      }
35  
36      /**
37       * Constructs an Expired Or Closed Account consisting of the following attributes.
38       *
39       * @param chartOfAccountsCode chart
40       * @param accountNumber       account
41       * @param subAccountNumber    subAccount
42       */
43      public ExpiredOrClosedAccount(String chartOfAccountsCode, String accountNumber, String subAccountNumber) {
44          setChartOfAccountsCode(chartOfAccountsCode);
45          setAccountNumber(accountNumber);
46          setSubAccountNumber(subAccountNumber);
47      }
48  
49      public String getAccountNumber() {
50          return accountNumber;
51      }
52  
53      public void setAccountNumber(String accountNumber) {
54          this.accountNumber = accountNumber;
55      }
56  
57      public String getChartOfAccountsCode() {
58          return chartOfAccountsCode;
59      }
60  
61      public void setChartOfAccountsCode(String chartOfAccountsCode) {
62          this.chartOfAccountsCode = chartOfAccountsCode;
63      }
64  
65      public boolean isClosedIndicator() {
66          return closedIndicator;
67      }
68  
69      public void setClosedIndicator(boolean closedIndicator) {
70          this.closedIndicator = closedIndicator;
71      }
72  
73      public boolean isContinuationAccountMissing() {
74          return continuationAccountMissing;
75      }
76  
77      public void setContinuationAccountMissing(boolean continuationAccountMissing) {
78          this.continuationAccountMissing = continuationAccountMissing;
79      }
80  
81      public boolean isExpiredIndicator() {
82          return expiredIndicator;
83      }
84  
85      public void setExpiredIndicator(boolean expiredIndicator) {
86          this.expiredIndicator = expiredIndicator;
87      }
88  
89      public String getSubAccountNumber() {
90          return subAccountNumber;
91      }
92  
93      public void setSubAccountNumber(String subAccountNumber) {
94          this.subAccountNumber = subAccountNumber;
95      }
96  
97      /**
98       * This is a helper method to return the account as a string in the format chart-account-subaccount.
99       *
100      * @return account string representation
101      */
102     public String getAccountString() {
103         StringBuffer accountStr = new StringBuffer("");
104 
105         if (getChartOfAccountsCode() != null) {
106             accountStr.append(getChartOfAccountsCode());
107         }
108 
109         if (getAccountNumber() != null) {
110             accountStr.append("-");
111             accountStr.append(getAccountNumber());
112         }
113 
114         if (getSubAccountNumber() != null) {
115             accountStr.append("-");
116             accountStr.append(getSubAccountNumber());
117         }
118 
119         return accountStr.toString();
120     }
121 }