001: /*
002: * Copyright 2005-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.gl.bo;
017:
018: import java.util.LinkedHashMap;
019:
020: import org.kuali.core.bo.PersistableBusinessObjectBase;
021: import org.kuali.core.util.KualiDecimal;
022: import org.kuali.kfs.bo.Options;
023: import org.kuali.module.chart.bo.Account;
024:
025: /**
026: * Represents a expenditure transaction for a specific fiscal year, COA code, account number,
027: * sub account number, object code, sub-object code, balance type code, object type code,
028: * fiscal accounting period, project code, organization reference ID
029: */
030: public class ExpenditureTransaction extends
031: PersistableBusinessObjectBase {
032: static final long serialVersionUID = 5296540728313789670L;
033:
034: private final static String UNIVERISITY_FISCAL_YEAR = "universityFiscalYear";
035: private final static String CHART_OF_ACCOUNTS_CODE = "chartOfAccountsCode";
036: private final static String ACCOUNT_NUMBER = "accountNumber";
037: private final static String SUB_ACCOUNT_NUMBER = "subAccountNumber";
038: private final static String OBJECT_CODE = "objectCode";
039: private final static String BALANCE_TYPE_CODE = "balanceTypeCode";
040: private final static String OBJECT_TYPE_CODE = "objectTypeCode";
041: private final static String UNIVERSITY_FISCAL_ACCOUNTING_PERIOD = "universityFiscalAccountingPeriod";
042: private final static String SUB_OBJECT_CODE = "subObjectCode";
043: private final static String PROJECT_CODE = "projectCode";
044: private final static String ORGANIZATION_REFERENCE_ID = "organizationReferenceId";
045:
046: private Integer universityFiscalYear;
047: private String chartOfAccountsCode;
048: private String accountNumber;
049: private String subAccountNumber;
050: private String objectCode;
051: private String subObjectCode;
052: private String balanceTypeCode;
053: private String objectTypeCode;
054: private String universityFiscalAccountingPeriod;
055: private String projectCode;
056: private String organizationReferenceId;
057: private KualiDecimal accountObjectDirectCostAmount;
058:
059: private Account account;
060: private Options option;
061:
062: /**
063: *
064: */
065: public ExpenditureTransaction() {
066: super ();
067: }
068:
069: public ExpenditureTransaction(Transaction t) {
070: universityFiscalYear = t.getUniversityFiscalYear();
071: chartOfAccountsCode = t.getChartOfAccountsCode();
072: accountNumber = t.getAccountNumber();
073: subAccountNumber = t.getSubAccountNumber();
074: objectCode = t.getFinancialObjectCode();
075: subObjectCode = t.getFinancialSubObjectCode();
076: balanceTypeCode = t.getFinancialBalanceTypeCode();
077: objectTypeCode = t.getFinancialObjectTypeCode();
078: universityFiscalAccountingPeriod = t
079: .getUniversityFiscalPeriodCode();
080: projectCode = t.getProjectCode();
081: organizationReferenceId = t.getOrganizationReferenceId();
082: accountObjectDirectCostAmount = new KualiDecimal(
083: KualiDecimal.ZERO.toString());
084: }
085:
086: protected LinkedHashMap toStringMapper() {
087: LinkedHashMap map = new LinkedHashMap();
088: map.put(UNIVERISITY_FISCAL_YEAR, getUniversityFiscalYear());
089: map.put(CHART_OF_ACCOUNTS_CODE, getChartOfAccountsCode());
090: map.put(ACCOUNT_NUMBER, getAccountNumber());
091: map.put(SUB_ACCOUNT_NUMBER, getSubAccountNumber());
092: map.put(OBJECT_CODE, getObjectCode());
093: map.put(SUB_OBJECT_CODE, getSubObjectCode());
094: map.put(BALANCE_TYPE_CODE, getBalanceTypeCode());
095: map.put(OBJECT_TYPE_CODE, getObjectTypeCode());
096: map.put(UNIVERSITY_FISCAL_ACCOUNTING_PERIOD,
097: getUniversityFiscalAccountingPeriod());
098: map.put(PROJECT_CODE, getProjectCode());
099: map
100: .put(ORGANIZATION_REFERENCE_ID,
101: getOrganizationReferenceId());
102: return map;
103: }
104:
105: public Options getOption() {
106: return option;
107: }
108:
109: public void setOption(Options option) {
110: this .option = option;
111: }
112:
113: public Account getAccount() {
114: return account;
115: }
116:
117: public void setAccount(Account a) {
118: account = a;
119: }
120:
121: public String getAccountNumber() {
122: return accountNumber;
123: }
124:
125: public void setAccountNumber(String accountNumber) {
126: this .accountNumber = accountNumber;
127: }
128:
129: public KualiDecimal getAccountObjectDirectCostAmount() {
130: return accountObjectDirectCostAmount;
131: }
132:
133: public void setAccountObjectDirectCostAmount(
134: KualiDecimal accountObjectDirectCostAmount) {
135: this .accountObjectDirectCostAmount = accountObjectDirectCostAmount;
136: }
137:
138: public String getBalanceTypeCode() {
139: return balanceTypeCode;
140: }
141:
142: public void setBalanceTypeCode(String balanceTypeCode) {
143: this .balanceTypeCode = balanceTypeCode;
144: }
145:
146: public String getChartOfAccountsCode() {
147: return chartOfAccountsCode;
148: }
149:
150: public void setChartOfAccountsCode(String chartOfAccountsCode) {
151: this .chartOfAccountsCode = chartOfAccountsCode;
152: }
153:
154: public String getObjectCode() {
155: return objectCode;
156: }
157:
158: public void setObjectCode(String objectCode) {
159: this .objectCode = objectCode;
160: }
161:
162: public String getObjectTypeCode() {
163: return objectTypeCode;
164: }
165:
166: public void setObjectTypeCode(String objectTypeCode) {
167: this .objectTypeCode = objectTypeCode;
168: }
169:
170: public String getOrganizationReferenceId() {
171: return organizationReferenceId;
172: }
173:
174: public void setOrganizationReferenceId(
175: String organizationReferenceId) {
176: this .organizationReferenceId = organizationReferenceId;
177: }
178:
179: public String getProjectCode() {
180: return projectCode;
181: }
182:
183: public void setProjectCode(String projectCode) {
184: this .projectCode = projectCode;
185: }
186:
187: public String getSubAccountNumber() {
188: return subAccountNumber;
189: }
190:
191: public void setSubAccountNumber(String subAccountNumber) {
192: this .subAccountNumber = subAccountNumber;
193: }
194:
195: public String getSubObjectCode() {
196: return subObjectCode;
197: }
198:
199: public void setSubObjectCode(String subObjectCode) {
200: this .subObjectCode = subObjectCode;
201: }
202:
203: public String getUniversityFiscalAccountingPeriod() {
204: return universityFiscalAccountingPeriod;
205: }
206:
207: public void setUniversityFiscalAccountingPeriod(
208: String universityFiscalAccountingPeriod) {
209: this .universityFiscalAccountingPeriod = universityFiscalAccountingPeriod;
210: }
211:
212: public Integer getUniversityFiscalYear() {
213: return universityFiscalYear;
214: }
215:
216: public void setUniversityFiscalYear(Integer universityFiscalYear) {
217: this.universityFiscalYear = universityFiscalYear;
218: }
219: }
|