View Javadoc
1   /*
2    * Copyright 2011 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  
17  package org.kuali.ole.coa.businessobject;
18  
19  import java.math.BigDecimal;
20  
21  import org.apache.log4j.Logger;
22  import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
23  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
24  import org.springframework.beans.BeanUtils;
25  
26  /**
27   * IndrectCostRecoveryAccount
28   */
29  public class IndirectCostRecoveryAccount extends PersistableBusinessObjectBase implements MutableInactivatable{
30      private static Logger LOG = Logger.getLogger(IndirectCostRecoveryAccount.class);
31  
32      private Integer indirectCostRecoveryAccountGeneratedIdentifier;
33      
34      //foreign keys to Account
35      private String chartOfAccountsCode;
36      private String accountNumber;
37      
38      private String indirectCostRecoveryFinCoaCode;
39      private String indirectCostRecoveryAccountNumber;
40      private BigDecimal accountLinePercent;
41      private boolean active;
42      
43      //BO Reference
44      private Account indirectCostRecoveryAccount;
45      private Chart indirectCostRecoveryChartOfAccounts;
46  
47      /**
48       * Default constructor.
49       */
50      public IndirectCostRecoveryAccount() {
51      }
52      
53  
54      public IndirectCostRecoveryAccount(IndirectCostRecoveryAccount icr) {
55          BeanUtils.copyProperties(icr, this);
56      }
57      
58      /**
59       * static instantiate an ICRAccount from an ICRAccount
60       *
61       * @param icrAccount
62       * @return
63       */
64      public static IndirectCostRecoveryAccount copyICRAccount(IndirectCostRecoveryAccount icrAccount) {
65          return new IndirectCostRecoveryAccount(icrAccount);
66      }
67      
68      public Integer getIndirectCostRecoveryAccountGeneratedIdentifier() {
69          return indirectCostRecoveryAccountGeneratedIdentifier;
70      }
71  
72      public String getChartOfAccountsCode() {
73          return chartOfAccountsCode;
74      }
75  
76      public String getAccountNumber() {
77          return accountNumber;
78      }
79  
80      public void setIndirectCostRecoveryAccountGeneratedIdentifier(Integer indirectCostRecoveryAccountGeneratedIdentifier) {
81          this.indirectCostRecoveryAccountGeneratedIdentifier = indirectCostRecoveryAccountGeneratedIdentifier;
82      }
83  
84      public void setChartOfAccountsCode(String chartOfAccountsCode) {
85          this.chartOfAccountsCode = chartOfAccountsCode;
86      }
87  
88      public void setAccountNumber(String accountNumber) {
89          this.accountNumber = accountNumber;
90      }
91      
92      public String getIndirectCostRecoveryFinCoaCode() {
93          return indirectCostRecoveryFinCoaCode;
94      }
95  
96      public String getIndirectCostRecoveryAccountNumber() {
97          return indirectCostRecoveryAccountNumber;
98      }
99  
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 }