/* * The Kuali Financial System, a comprehensive financial management system for higher education. * * Copyright 2005-2014 The Kuali Foundation * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.kuali.kfs.module.bc.businessobject; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import org.kuali.kfs.coa.businessobject.Account; import org.kuali.kfs.coa.businessobject.Chart; import org.kuali.kfs.coa.businessobject.Organization; import org.kuali.kfs.coa.businessobject.SubAccount; import org.kuali.kfs.sys.KFSPropertyConstants; import org.kuali.kfs.sys.context.SpringContext; import org.kuali.rice.kim.api.identity.Person; import org.kuali.rice.krad.bo.DocumentHeader; import org.kuali.rice.krad.bo.PersistableBusinessObjectBase; /** * */ public class BudgetConstructionHeader extends PersistableBusinessObjectBase { private String documentNumber; private Integer universityFiscalYear; private String chartOfAccountsCode; private String accountNumber; private String subAccountNumber; private Integer organizationLevelCode; private String organizationLevelChartOfAccountsCode; private String organizationLevelOrganizationCode; private String budgetLockUserIdentifier; private String budgetTransactionLockUserIdentifier; private Chart chartOfAccounts; private Account account; private SubAccount subAccount; private Person budgetLockUser; private Person budgetTransactionLockUser; private Organization organizationLevelOrganization; private DocumentHeader financialDocument; private BudgetConstructionAccountReports budgetConstructionAccountReports; private List budgetConstructionAccountSelect; /** * Default constructor. */ public BudgetConstructionHeader() { budgetConstructionAccountSelect = new ArrayList(); } /** * Gets the documentNumber attribute. * * @return Returns the documentNumber */ public String getDocumentNumber() { return documentNumber; } /** * Sets the documentNumber attribute. * * @param documentNumber The documentNumber to set. */ public void setDocumentNumber(String documentNumber) { this.documentNumber = documentNumber; } /** * Gets the universityFiscalYear attribute. * * @return Returns the universityFiscalYear */ public Integer getUniversityFiscalYear() { return universityFiscalYear; } /** * Sets the universityFiscalYear attribute. * * @param universityFiscalYear The universityFiscalYear to set. */ public void setUniversityFiscalYear(Integer universityFiscalYear) { this.universityFiscalYear = universityFiscalYear; } /** * Gets the chartOfAccountsCode attribute. * * @return Returns the chartOfAccountsCode */ public String getChartOfAccountsCode() { return chartOfAccountsCode; } /** * Sets the chartOfAccountsCode attribute. * * @param chartOfAccountsCode The chartOfAccountsCode to set. */ public void setChartOfAccountsCode(String chartOfAccountsCode) { this.chartOfAccountsCode = chartOfAccountsCode; } /** * Gets the accountNumber attribute. * * @return Returns the accountNumber */ public String getAccountNumber() { return accountNumber; } /** * Sets the accountNumber attribute. * * @param accountNumber The accountNumber to set. */ public void setAccountNumber(String accountNumber) { this.accountNumber = accountNumber; } /** * Gets the subAccountNumber attribute. * * @return Returns the subAccountNumber */ public String getSubAccountNumber() { return subAccountNumber; } /** * Sets the subAccountNumber attribute. * * @param subAccountNumber The subAccountNumber to set. */ public void setSubAccountNumber(String subAccountNumber) { this.subAccountNumber = subAccountNumber; } /** * Gets the organizationLevelCode attribute. * * @return Returns the organizationLevelCode */ public Integer getOrganizationLevelCode() { return organizationLevelCode; } /** * Sets the organizationLevelCode attribute. * * @param organizationLevelCode The organizationLevelCode to set. */ public void setOrganizationLevelCode(Integer organizationLevelCode) { this.organizationLevelCode = organizationLevelCode; } /** * Gets the organizationLevelChartOfAccountsCode attribute. * * @return Returns the organizationLevelChartOfAccountsCode */ public String getOrganizationLevelChartOfAccountsCode() { return organizationLevelChartOfAccountsCode; } /** * Sets the organizationLevelChartOfAccountsCode attribute. * * @param organizationLevelChartOfAccountsCode The organizationLevelChartOfAccountsCode to set. */ public void setOrganizationLevelChartOfAccountsCode(String organizationLevelChartOfAccountsCode) { this.organizationLevelChartOfAccountsCode = organizationLevelChartOfAccountsCode; } /** * Gets the organizationLevelOrganizationCode attribute. * * @return Returns the organizationLevelOrganizationCode */ public String getOrganizationLevelOrganizationCode() { return organizationLevelOrganizationCode; } /** * Sets the organizationLevelOrganizationCode attribute. * * @param organizationLevelOrganizationCode The organizationLevelOrganizationCode to set. */ public void setOrganizationLevelOrganizationCode(String organizationLevelOrganizationCode) { this.organizationLevelOrganizationCode = organizationLevelOrganizationCode; } /** * Gets the budgetLockUserIdentifier attribute. * * @return Returns the budgetLockUserIdentifier */ public String getBudgetLockUserIdentifier() { return budgetLockUserIdentifier; } /** * Sets the budgetLockUserIdentifier attribute. * * @param budgetLockUserIdentifier The budgetLockUserIdentifier to set. */ public void setBudgetLockUserIdentifier(String budgetLockUserIdentifier) { this.budgetLockUserIdentifier = budgetLockUserIdentifier; } /** * Gets the budgetTransactionLockUserIdentifier attribute. * * @return Returns the budgetTransactionLockUserIdentifier */ public String getBudgetTransactionLockUserIdentifier() { return budgetTransactionLockUserIdentifier; } /** * Sets the budgetTransactionLockUserIdentifier attribute. * * @param budgetTransactionLockUserIdentifier The budgetTransactionLockUserIdentifier to set. */ public void setBudgetTransactionLockUserIdentifier(String budgetTransactionLockUserIdentifier) { this.budgetTransactionLockUserIdentifier = budgetTransactionLockUserIdentifier; } /** * Gets the chartOfAccounts attribute. * * @return Returns the chartOfAccounts */ public Chart getChartOfAccounts() { return chartOfAccounts; } /** * Sets the chartOfAccounts attribute. * * @param chartOfAccounts The chartOfAccounts to set. * @deprecated */ public void setChartOfAccounts(Chart chartOfAccounts) { this.chartOfAccounts = chartOfAccounts; } /** * Gets the account attribute. * * @return Returns the account */ public Account getAccount() { return account; } /** * Sets the account attribute. * * @param account The account to set. * @deprecated */ public void setAccount(Account account) { this.account = account; } public Person getBudgetLockUser() { if (budgetLockUserIdentifier != null){ budgetLockUser = SpringContext.getBean(org.kuali.rice.kim.api.identity.PersonService.class).updatePersonIfNecessary(budgetLockUserIdentifier, budgetLockUser); } return budgetLockUser; } /** * Sets the budgetLockUser attribute. * * @param budgetLockUser The budgetLockUser to set. * @deprecated */ public void setBudgetLockUser(Person budgetLockUser) { this.budgetLockUser = budgetLockUser; } /** * Gets the budgetConstructionAccountSelect list. * * @return Returns the budgetConstructionAccountSelect list */ public List getBudgetConstructionAccountSelect() { return budgetConstructionAccountSelect; } /** * Sets the budgetConstructionAccountSelect list. * * @param budgetConstructionAccountSelect The budgetConstructionAccountSelect list to set. */ public void setBudgetConstructionAccountSelect(List budgetConstructionAccountSelect) { this.budgetConstructionAccountSelect = budgetConstructionAccountSelect; } public Person getBudgetTransactionLockUser() { if (budgetTransactionLockUserIdentifier != null){ budgetTransactionLockUser = SpringContext.getBean(org.kuali.rice.kim.api.identity.PersonService.class).updatePersonIfNecessary(budgetTransactionLockUserIdentifier, budgetTransactionLockUser); } return budgetTransactionLockUser; } /** * Sets the budgetTransactionLockUser attribute value. * * @param budgetTransactionLockUser The budgetTransactionLockUser to set. * @deprecated */ public void setBudgetTransactionLockUser(Person budgetTransactionLockUser) { this.budgetTransactionLockUser = budgetTransactionLockUser; } /** * Gets the organizationLevelOrganization attribute. * * @return Returns the organizationLevelOrganization. */ public Organization getOrganizationLevelOrganization() { return organizationLevelOrganization; } /** * Sets the organizationLevelOrganization attribute value. * * @param organizationLevelOrganization The organizationLevelOrganization to set. * @deprecated */ public void setOrganizationLevelOrganization(Organization organizationLevelOrganization) { this.organizationLevelOrganization = organizationLevelOrganization; } /** * Gets the subAccount attribute. * * @return Returns the subAccount. */ public SubAccount getSubAccount() { return subAccount; } /** * Sets the subAccount attribute value. * * @param subAccount The subAccount to set. */ public void setSubAccount(SubAccount subAccount) { this.subAccount = subAccount; } /** * Gets the financialDocument attribute. * * @return Returns the financialDocument. */ public DocumentHeader getFinancialDocument() { return financialDocument; } /** * Sets the financialDocument attribute value. * * @param financialDocument The financialDocument to set. * @deprecated */ public void setFinancialDocument(DocumentHeader financialDocument) { this.financialDocument = financialDocument; } /** * Gets the budgetConstructionAccountReports attribute. * * @return Returns the budgetConstructionAccountReports. */ public BudgetConstructionAccountReports getBudgetConstructionAccountReports() { return budgetConstructionAccountReports; } /** * Sets the budgetConstructionAccountReports attribute value. * * @param budgetConstructionAccountReports The budgetConstructionAccountReports to set. */ public void setBudgetConstructionAccountReports(BudgetConstructionAccountReports budgetConstructionAccountReports) { this.budgetConstructionAccountReports = budgetConstructionAccountReports; } /** * Returns a map with the primitive field names as the key and the primitive values as the map value. * * @return Map */ public Map getValuesMap() { Map simpleValues = new HashMap(); simpleValues.put("documentNumber", getDocumentNumber()); simpleValues.put("universityFiscalYear", getUniversityFiscalYear()); simpleValues.put("chartOfAccountsCode", getChartOfAccountsCode()); simpleValues.put("accountNumber", getAccountNumber()); simpleValues.put("subAccountNumber", getSubAccountNumber()); return simpleValues; } /** * @see org.kuali.rice.krad.bo.BusinessObjectBase#toStringMapper() */ protected LinkedHashMap toStringMapper_RICE20_REFACTORME() { LinkedHashMap m = new LinkedHashMap(); m.put(KFSPropertyConstants.DOCUMENT_NUMBER, this.documentNumber); if (this.universityFiscalYear != null) { m.put("universityFiscalYear", this.universityFiscalYear.toString()); } m.put("chartOfAccountsCode", this.chartOfAccountsCode); m.put("accountNumber", this.accountNumber); m.put("subAccountNumber", this.subAccountNumber); return m; } }