View Javadoc
1   /*
2    * Copyright 2006 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  package org.kuali.ole.fp.businessobject;
17  
18  import java.util.Map;
19  
20  import org.kuali.ole.sys.businessobject.AccountingLine;
21  import org.kuali.ole.sys.businessobject.TargetAccountingLine;
22  import org.kuali.rice.core.api.util.type.KualiDecimal;
23  import org.kuali.rice.core.api.util.type.KualiInteger;
24  
25  /**
26   * This class represents a target accounting line for budget adjustment
27   */
28  public class BudgetAdjustmentTargetAccountingLine extends TargetAccountingLine implements BudgetAdjustmentAccountingLine {
29  
30      private String budgetAdjustmentPeriodCode;
31      private KualiDecimal currentBudgetAdjustmentAmount;
32      private KualiDecimal baseBudgetAdjustmentAmount;
33      private KualiDecimal financialDocumentMonth1LineAmount;
34      private KualiDecimal financialDocumentMonth2LineAmount;
35      private KualiDecimal financialDocumentMonth3LineAmount;
36      private KualiDecimal financialDocumentMonth4LineAmount;
37      private KualiDecimal financialDocumentMonth5LineAmount;
38      private KualiDecimal financialDocumentMonth6LineAmount;
39      private KualiDecimal financialDocumentMonth7LineAmount;
40      private KualiDecimal financialDocumentMonth8LineAmount;
41      private KualiDecimal financialDocumentMonth9LineAmount;
42      private KualiDecimal financialDocumentMonth10LineAmount;
43      private KualiDecimal financialDocumentMonth11LineAmount;
44      private KualiDecimal financialDocumentMonth12LineAmount;
45      private boolean fringeBenefitIndicator;
46  
47      public BudgetAdjustmentTargetAccountingLine() {
48          super();
49          BudgetAdjustmentAccountingLineUtil.init(this);
50      }
51  
52      /**
53       * @see org.kuali.rice.krad.bo.AccountingLineBase#getValuesMap()
54       */
55      @Override
56      public Map getValuesMap() {
57          Map simpleValues = super.getValuesMap();
58          simpleValues.remove("amount"); // remove the amount key; we'll use base and current instead
59          BudgetAdjustmentAccountingLineUtil.appendToValuesMap(simpleValues, this);
60          return simpleValues;
61      }
62  
63      /**
64       * @see org.kuali.rice.krad.bo.AccountingLineBase#copyFrom(org.kuali.rice.krad.bo.AccountingLine)
65       */
66      @Override
67      public void copyFrom(AccountingLine other) {
68          super.copyFrom(other);
69          BudgetAdjustmentAccountingLineUtil.copyFrom(this, other);
70      }
71  
72      /**
73       * @see org.kuali.ole.fp.businessobject.BudgetAdjustmentAccountingLine#getMonthlyLinesTotal()
74       */
75      public KualiDecimal getMonthlyLinesTotal() {
76          return BudgetAdjustmentAccountingLineUtil.getMonthlyLinesTotal(this);
77      }
78  
79      public KualiDecimal getBaseBudgetAdjustmentAmount() {
80          return baseBudgetAdjustmentAmount;
81      }
82  
83      public void setBaseBudgetAdjustmentAmount(KualiDecimal baseBudgetAdjustmentAmount) {
84          if (baseBudgetAdjustmentAmount != null) {
85              this.baseBudgetAdjustmentAmount = baseBudgetAdjustmentAmount;
86          }
87      }
88  
89      public String getBudgetAdjustmentPeriodCode() {
90          return budgetAdjustmentPeriodCode;
91      }
92  
93      public void setBudgetAdjustmentPeriodCode(String budgetAdjustmentPeriodCode) {
94          this.budgetAdjustmentPeriodCode = budgetAdjustmentPeriodCode;
95      }
96  
97      public KualiDecimal getCurrentBudgetAdjustmentAmount() {
98          return currentBudgetAdjustmentAmount;
99      }
100 
101     public void setCurrentBudgetAdjustmentAmount(KualiDecimal currentBudgetAdjustmentAmount) {
102         if (currentBudgetAdjustmentAmount != null) {
103             this.currentBudgetAdjustmentAmount = currentBudgetAdjustmentAmount;
104         }
105     }
106 
107     /**
108      * Gets the financialDocumentMonth1LineAmount attribute.
109      * 
110      * @return Returns the financialDocumentMonth1LineAmount
111      */
112     public KualiDecimal getFinancialDocumentMonth1LineAmount() {
113         return financialDocumentMonth1LineAmount;
114     }
115 
116     /**
117      * Sets the financialDocumentMonth1LineAmount attribute.
118      * 
119      * @param financialDocumentMonth1LineAmount The financialDocumentMonth1LineAmount to set.
120      */
121     public void setFinancialDocumentMonth1LineAmount(KualiDecimal financialDocumentMonth1LineAmount) {
122         if (financialDocumentMonth1LineAmount != null) {
123             this.financialDocumentMonth1LineAmount = financialDocumentMonth1LineAmount;
124         }
125     }
126 
127 
128     /**
129      * Gets the financialDocumentMonth2LineAmount attribute.
130      * 
131      * @return Returns the financialDocumentMonth2LineAmount
132      */
133     public KualiDecimal getFinancialDocumentMonth2LineAmount() {
134         return financialDocumentMonth2LineAmount;
135     }
136 
137     /**
138      * Sets the financialDocumentMonth2LineAmount attribute.
139      * 
140      * @param financialDocumentMonth2LineAmount The financialDocumentMonth2LineAmount to set.
141      */
142     public void setFinancialDocumentMonth2LineAmount(KualiDecimal financialDocumentMonth2LineAmount) {
143         if (financialDocumentMonth2LineAmount != null) {
144             this.financialDocumentMonth2LineAmount = financialDocumentMonth2LineAmount;
145         }
146     }
147 
148 
149     /**
150      * Gets the financialDocumentMonth3LineAmount attribute.
151      * 
152      * @return Returns the financialDocumentMonth3LineAmount
153      */
154     public KualiDecimal getFinancialDocumentMonth3LineAmount() {
155         return financialDocumentMonth3LineAmount;
156     }
157 
158     /**
159      * Sets the financialDocumentMonth3LineAmount attribute.
160      * 
161      * @param financialDocumentMonth3LineAmount The financialDocumentMonth3LineAmount to set.
162      */
163     public void setFinancialDocumentMonth3LineAmount(KualiDecimal financialDocumentMonth3LineAmount) {
164         if (financialDocumentMonth3LineAmount != null) {
165             this.financialDocumentMonth3LineAmount = financialDocumentMonth3LineAmount;
166         }
167     }
168 
169 
170     /**
171      * Gets the financialDocumentMonth4LineAmount attribute.
172      * 
173      * @return Returns the financialDocumentMonth4LineAmount
174      */
175     public KualiDecimal getFinancialDocumentMonth4LineAmount() {
176         return financialDocumentMonth4LineAmount;
177     }
178 
179     /**
180      * Sets the financialDocumentMonth4LineAmount attribute.
181      * 
182      * @param financialDocumentMonth4LineAmount The financialDocumentMonth4LineAmount to set.
183      */
184     public void setFinancialDocumentMonth4LineAmount(KualiDecimal financialDocumentMonth4LineAmount) {
185         if (financialDocumentMonth4LineAmount != null) {
186             this.financialDocumentMonth4LineAmount = financialDocumentMonth4LineAmount;
187         }
188     }
189 
190 
191     /**
192      * Gets the financialDocumentMonth5LineAmount attribute.
193      * 
194      * @return Returns the financialDocumentMonth5LineAmount
195      */
196     public KualiDecimal getFinancialDocumentMonth5LineAmount() {
197         return financialDocumentMonth5LineAmount;
198     }
199 
200     /**
201      * Sets the financialDocumentMonth5LineAmount attribute.
202      * 
203      * @param financialDocumentMonth5LineAmount The financialDocumentMonth5LineAmount to set.
204      */
205     public void setFinancialDocumentMonth5LineAmount(KualiDecimal financialDocumentMonth5LineAmount) {
206         if (financialDocumentMonth5LineAmount != null) {
207             this.financialDocumentMonth5LineAmount = financialDocumentMonth5LineAmount;
208         }
209     }
210 
211 
212     /**
213      * Gets the financialDocumentMonth6LineAmount attribute.
214      * 
215      * @return Returns the financialDocumentMonth6LineAmount
216      */
217     public KualiDecimal getFinancialDocumentMonth6LineAmount() {
218         return financialDocumentMonth6LineAmount;
219     }
220 
221     /**
222      * Sets the financialDocumentMonth6LineAmount attribute.
223      * 
224      * @param financialDocumentMonth6LineAmount The financialDocumentMonth6LineAmount to set.
225      */
226     public void setFinancialDocumentMonth6LineAmount(KualiDecimal financialDocumentMonth6LineAmount) {
227         if (financialDocumentMonth6LineAmount != null) {
228             this.financialDocumentMonth6LineAmount = financialDocumentMonth6LineAmount;
229         }
230     }
231 
232 
233     /**
234      * Gets the financialDocumentMonth7LineAmount attribute.
235      * 
236      * @return Returns the financialDocumentMonth7LineAmount
237      */
238     public KualiDecimal getFinancialDocumentMonth7LineAmount() {
239         return financialDocumentMonth7LineAmount;
240     }
241 
242     /**
243      * Sets the financialDocumentMonth7LineAmount attribute.
244      * 
245      * @param financialDocumentMonth7LineAmount The financialDocumentMonth7LineAmount to set.
246      */
247     public void setFinancialDocumentMonth7LineAmount(KualiDecimal financialDocumentMonth7LineAmount) {
248         if (financialDocumentMonth7LineAmount != null) {
249             this.financialDocumentMonth7LineAmount = financialDocumentMonth7LineAmount;
250         }
251     }
252 
253 
254     /**
255      * Gets the financialDocumentMonth8LineAmount attribute.
256      * 
257      * @return Returns the financialDocumentMonth8LineAmount
258      */
259     public KualiDecimal getFinancialDocumentMonth8LineAmount() {
260         return financialDocumentMonth8LineAmount;
261     }
262 
263     /**
264      * Sets the financialDocumentMonth8LineAmount attribute.
265      * 
266      * @param financialDocumentMonth8LineAmount The financialDocumentMonth8LineAmount to set.
267      */
268     public void setFinancialDocumentMonth8LineAmount(KualiDecimal financialDocumentMonth8LineAmount) {
269         if (financialDocumentMonth8LineAmount != null) {
270             this.financialDocumentMonth8LineAmount = financialDocumentMonth8LineAmount;
271         }
272     }
273 
274 
275     /**
276      * Gets the financialDocumentMonth9LineAmount attribute.
277      * 
278      * @return Returns the financialDocumentMonth9LineAmount
279      */
280     public KualiDecimal getFinancialDocumentMonth9LineAmount() {
281         return financialDocumentMonth9LineAmount;
282     }
283 
284     /**
285      * Sets the financialDocumentMonth9LineAmount attribute.
286      * 
287      * @param financialDocumentMonth9LineAmount The financialDocumentMonth9LineAmount to set.
288      */
289     public void setFinancialDocumentMonth9LineAmount(KualiDecimal financialDocumentMonth9LineAmount) {
290         if (financialDocumentMonth9LineAmount != null) {
291             this.financialDocumentMonth9LineAmount = financialDocumentMonth9LineAmount;
292         }
293     }
294 
295 
296     /**
297      * Gets the financialDocumentMonth10LineAmount attribute.
298      * 
299      * @return Returns the financialDocumentMonth10LineAmount
300      */
301     public KualiDecimal getFinancialDocumentMonth10LineAmount() {
302         return financialDocumentMonth10LineAmount;
303     }
304 
305     /**
306      * Sets the financialDocumentMonth10LineAmount attribute.
307      * 
308      * @param financialDocumentMonth10LineAmount The financialDocumentMonth10LineAmount to set.
309      */
310     public void setFinancialDocumentMonth10LineAmount(KualiDecimal financialDocumentMonth10LineAmount) {
311         if (financialDocumentMonth10LineAmount != null) {
312             this.financialDocumentMonth10LineAmount = financialDocumentMonth10LineAmount;
313         }
314     }
315 
316     /**
317      * Gets the financialDocumentMonth11LineAmount attribute.
318      * 
319      * @return Returns the financialDocumentMonth11LineAmount
320      */
321     public KualiDecimal getFinancialDocumentMonth11LineAmount() {
322         return financialDocumentMonth11LineAmount;
323     }
324 
325     /**
326      * Sets the financialDocumentMonth11LineAmount attribute.
327      * 
328      * @param financialDocumentMonth11LineAmount The financialDocumentMonth11LineAmount to set.
329      */
330     public void setFinancialDocumentMonth11LineAmount(KualiDecimal financialDocumentMonth11LineAmount) {
331         if (financialDocumentMonth11LineAmount != null) {
332             this.financialDocumentMonth11LineAmount = financialDocumentMonth11LineAmount;
333         }
334     }
335 
336     /**
337      * Gets the financialDocumentMonth12LineAmount attribute.
338      * 
339      * @return Returns the financialDocumentMonth12LineAmount
340      */
341     public KualiDecimal getFinancialDocumentMonth12LineAmount() {
342         return financialDocumentMonth12LineAmount;
343     }
344 
345     /**
346      * Sets the financialDocumentMonth12LineAmount attribute.
347      * 
348      * @param financialDocumentMonth12LineAmount The financialDocumentMonth12LineAmount to set.
349      */
350     public void setFinancialDocumentMonth12LineAmount(KualiDecimal financialDocumentMonth12LineAmount) {
351         if (financialDocumentMonth12LineAmount != null) {
352             this.financialDocumentMonth12LineAmount = financialDocumentMonth12LineAmount;
353         }
354     }
355 
356     /**
357      * Gets the fringeBenefitIndicator attribute.
358      * 
359      * @return Returns the fringeBenefitIndicator.
360      */
361     public boolean isFringeBenefitIndicator() {
362         return fringeBenefitIndicator;
363     }
364 
365     /**
366      * Sets the fringeBenefitIndicator attribute value.
367      * 
368      * @param fringeBenefitIndicator The fringeBenefitIndicator to set.
369      */
370     public void setFringeBenefitIndicator(boolean fringeBenefitIndicator) {
371         this.fringeBenefitIndicator = fringeBenefitIndicator;
372     }
373 
374     /**
375      * @see org.kuali.ole.fp.businessobject.BudgetAdjustmentAccountingLine#clearFinancialDocumentMonthLineAmounts()
376      */
377     public void clearFinancialDocumentMonthLineAmounts() {
378         financialDocumentMonth1LineAmount = KualiDecimal.ZERO;
379         financialDocumentMonth2LineAmount = KualiDecimal.ZERO;
380         financialDocumentMonth3LineAmount = KualiDecimal.ZERO;
381         financialDocumentMonth4LineAmount = KualiDecimal.ZERO;
382         financialDocumentMonth5LineAmount = KualiDecimal.ZERO;
383         financialDocumentMonth6LineAmount = KualiDecimal.ZERO;
384         financialDocumentMonth7LineAmount = KualiDecimal.ZERO;
385         financialDocumentMonth8LineAmount = KualiDecimal.ZERO;
386         financialDocumentMonth9LineAmount = KualiDecimal.ZERO;
387         financialDocumentMonth10LineAmount = KualiDecimal.ZERO;
388         financialDocumentMonth11LineAmount = KualiDecimal.ZERO;
389         financialDocumentMonth12LineAmount = KualiDecimal.ZERO;
390     }
391 
392     /**
393      * @see org.kuali.ole.sys.businessobject.AccountingLineBase#isSourceAccountingLine()
394      */
395     @Override
396     public boolean isSourceAccountingLine() {
397         return false;
398     }
399 
400     /**
401      * @see org.kuali.ole.sys.businessobject.AccountingLineBase#isTargetAccountingLine()
402      */
403     @Override
404     public boolean isTargetAccountingLine() {
405         return true;
406     }
407 }