001/*
002 * Copyright 2011 The Kuali Foundation
003 * 
004 * Licensed under the Educational Community License, Version 2.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/ecl2.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
017package org.kuali.ole.coa.businessobject;
018
019import java.math.BigDecimal;
020
021import org.apache.log4j.Logger;
022import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
023import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
024import org.springframework.beans.BeanUtils;
025
026/**
027 * IndrectCostRecoveryAccount
028 */
029public class IndirectCostRecoveryAccount extends PersistableBusinessObjectBase implements MutableInactivatable{
030    private static Logger LOG = Logger.getLogger(IndirectCostRecoveryAccount.class);
031
032    private Integer indirectCostRecoveryAccountGeneratedIdentifier;
033    
034    //foreign keys to Account
035    private String chartOfAccountsCode;
036    private String accountNumber;
037    
038    private String indirectCostRecoveryFinCoaCode;
039    private String indirectCostRecoveryAccountNumber;
040    private BigDecimal accountLinePercent;
041    private boolean active;
042    
043    //BO Reference
044    private Account indirectCostRecoveryAccount;
045    private Chart indirectCostRecoveryChartOfAccounts;
046
047    /**
048     * Default constructor.
049     */
050    public IndirectCostRecoveryAccount() {
051    }
052    
053
054    public IndirectCostRecoveryAccount(IndirectCostRecoveryAccount icr) {
055        BeanUtils.copyProperties(icr, this);
056    }
057    
058    /**
059     * static instantiate an ICRAccount from an ICRAccount
060     *
061     * @param icrAccount
062     * @return
063     */
064    public static IndirectCostRecoveryAccount copyICRAccount(IndirectCostRecoveryAccount icrAccount) {
065        return new IndirectCostRecoveryAccount(icrAccount);
066    }
067    
068    public Integer getIndirectCostRecoveryAccountGeneratedIdentifier() {
069        return indirectCostRecoveryAccountGeneratedIdentifier;
070    }
071
072    public String getChartOfAccountsCode() {
073        return chartOfAccountsCode;
074    }
075
076    public String getAccountNumber() {
077        return accountNumber;
078    }
079
080    public void setIndirectCostRecoveryAccountGeneratedIdentifier(Integer indirectCostRecoveryAccountGeneratedIdentifier) {
081        this.indirectCostRecoveryAccountGeneratedIdentifier = indirectCostRecoveryAccountGeneratedIdentifier;
082    }
083
084    public void setChartOfAccountsCode(String chartOfAccountsCode) {
085        this.chartOfAccountsCode = chartOfAccountsCode;
086    }
087
088    public void setAccountNumber(String accountNumber) {
089        this.accountNumber = accountNumber;
090    }
091    
092    public String getIndirectCostRecoveryFinCoaCode() {
093        return indirectCostRecoveryFinCoaCode;
094    }
095
096    public String getIndirectCostRecoveryAccountNumber() {
097        return indirectCostRecoveryAccountNumber;
098    }
099
100    public BigDecimal getAccountLinePercent() {
101        return accountLinePercent;
102    }
103
104    public void setIndirectCostRecoveryFinCoaCode(String indirectCostRecoveryFinCoaCode) {
105        this.indirectCostRecoveryFinCoaCode = indirectCostRecoveryFinCoaCode;
106    }
107
108    public void setIndirectCostRecoveryAccountNumber(String indirectCostRecoveryAccountNumber) {
109        this.indirectCostRecoveryAccountNumber = indirectCostRecoveryAccountNumber;
110    }
111
112    public void setAccountLinePercent(BigDecimal accountLinePercent) {
113        this.accountLinePercent = accountLinePercent;
114    }
115
116    public Account getIndirectCostRecoveryAccount() {
117        return indirectCostRecoveryAccount;
118    }
119
120    /**
121     * Sets the indirectCostRecoveryAccount attribute.
122     * 
123     * @param account The account to set.
124     * @deprecated Setter is required by OJB, but should not be used to modify this attribute. This attribute is set on the initial
125     *             creation of the object and should not be changed.
126     */
127    @Deprecated
128    public void setIndirectCostRecoveryAccount(Account indirectCostRecoveryAccount) {
129        this.indirectCostRecoveryAccount = indirectCostRecoveryAccount;
130    }
131
132    /***
133     * @return
134     */
135    public Chart getIndirectCostRecoveryChartOfAccounts() {
136        return indirectCostRecoveryChartOfAccounts;
137    }
138
139    /**
140     * Sets the indirectCostRcvyChartOfAccounts attribute.
141     * 
142     * @param indirectCostRcvyChartOfAccounts The chartOfAccounts to set.
143     * @deprecated Setter is required by OJB, but should not be used to modify this attribute. This attribute is set on the initial
144     *             creation of the object and should not be changed.
145     */
146    @Deprecated
147    public void setIndirectCostRecoveryChartOfAccounts(Chart indirectCostRecoveryChartOfAccounts) {
148        this.indirectCostRecoveryChartOfAccounts = indirectCostRecoveryChartOfAccounts;
149    }
150    
151    @Override
152    public boolean isActive() {
153        return active;
154    }
155
156    @Override
157    public void setActive(boolean active) {
158        this.active = active;
159    }
160
161}