001: /*
002: * Copyright 2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.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/ecl1.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: package org.kuali.module.purap.util;
017:
018: /**
019: *
020: * Expired or Closed Account
021: */
022: public class ExpiredOrClosedAccount {
023:
024: private String chartOfAccountsCode;
025: private String accountNumber;
026: private String subAccountNumber;
027: private boolean closedIndicator;
028: private boolean expiredIndicator;
029: private boolean continuationAccountMissing;
030:
031: /**
032: *
033: * Default constructor
034: */
035: public ExpiredOrClosedAccount() {
036: }
037:
038: /**
039: *
040: * Constructs an Expired Or Closed Account consisting of the following attributes.
041: * @param chartOfAccountsCode chart
042: * @param accountNumber account
043: * @param subAccountNumber subAccount
044: */
045: public ExpiredOrClosedAccount(String chartOfAccountsCode,
046: String accountNumber, String subAccountNumber) {
047: setChartOfAccountsCode(chartOfAccountsCode);
048: setAccountNumber(accountNumber);
049: setSubAccountNumber(subAccountNumber);
050: }
051:
052: public String getAccountNumber() {
053: return accountNumber;
054: }
055:
056: public void setAccountNumber(String accountNumber) {
057: this .accountNumber = accountNumber;
058: }
059:
060: public String getChartOfAccountsCode() {
061: return chartOfAccountsCode;
062: }
063:
064: public void setChartOfAccountsCode(String chartOfAccountsCode) {
065: this .chartOfAccountsCode = chartOfAccountsCode;
066: }
067:
068: public boolean isClosedIndicator() {
069: return closedIndicator;
070: }
071:
072: public void setClosedIndicator(boolean closedIndicator) {
073: this .closedIndicator = closedIndicator;
074: }
075:
076: public boolean isContinuationAccountMissing() {
077: return continuationAccountMissing;
078: }
079:
080: public void setContinuationAccountMissing(
081: boolean continuationAccountMissing) {
082: this .continuationAccountMissing = continuationAccountMissing;
083: }
084:
085: public boolean isExpiredIndicator() {
086: return expiredIndicator;
087: }
088:
089: public void setExpiredIndicator(boolean expiredIndicator) {
090: this .expiredIndicator = expiredIndicator;
091: }
092:
093: public String getSubAccountNumber() {
094: return subAccountNumber;
095: }
096:
097: public void setSubAccountNumber(String subAccountNumber) {
098: this .subAccountNumber = subAccountNumber;
099: }
100:
101: /**
102: * This is a helper method to return the account as a string in the format chart-account-subaccount.
103: *
104: * @return account string representation
105: */
106: public String getAccountString() {
107: StringBuffer accountStr = new StringBuffer("");
108:
109: if (getChartOfAccountsCode() != null) {
110: accountStr.append(getChartOfAccountsCode());
111: }
112:
113: if (getAccountNumber() != null) {
114: accountStr.append("-");
115: accountStr.append(getAccountNumber());
116: }
117:
118: if (getSubAccountNumber() != null) {
119: accountStr.append("-");
120: accountStr.append(getSubAccountNumber());
121: }
122:
123: return accountStr.toString();
124: }
125: }
|