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    
017    package org.kuali.kfs.module.bc.businessobject;
018    
019    import java.util.LinkedHashMap;
020    
021    import org.kuali.kfs.coa.businessobject.Account;
022    import org.kuali.kfs.coa.businessobject.Chart;
023    import org.kuali.kfs.coa.businessobject.ObjectType;
024    import org.kuali.kfs.coa.businessobject.SubAccount;
025    import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
026    import org.kuali.rice.kns.util.KualiInteger;
027    
028    /**
029     * 
030     */
031    public class BudgetConstructionRequestMove extends PersistableBusinessObjectBase {
032    
033        private String principalId;
034        private String chartOfAccountsCode;
035        private String accountNumber;
036        private String subAccountNumber;
037        private String financialObjectCode;
038        private String financialSubObjectCode;
039        private String financialObjectTypeCode;
040        private KualiInteger accountLineAnnualBalanceAmount;
041        private String requestUpdateErrorCode;
042        private KualiInteger financialDocumentMonth1LineAmount;
043        private KualiInteger financialDocumentMonth2LineAmount;
044        private KualiInteger financialDocumentMonth3LineAmount;
045        private KualiInteger financialDocumentMonth4LineAmount;
046        private KualiInteger financialDocumentMonth5LineAmount;
047        private KualiInteger financialDocumentMonth6LineAmount;
048        private KualiInteger financialDocumentMonth7LineAmount;
049        private KualiInteger financialDocumentMonth8LineAmount;
050        private KualiInteger financialDocumentMonth9LineAmount;
051        private KualiInteger financialDocumentMonth10LineAmount;
052        private KualiInteger financialDocumentMonth11LineAmount;
053        private KualiInteger financialDocumentMonth12LineAmount;
054        
055        private boolean hasAccess = false;
056        private boolean hasLock = false;
057        
058        private Chart chartOfAccounts;
059        private Account account;
060        private SubAccount subAccount;
061        private ObjectType objectType;
062    
063        /**
064         * Default constructor.
065         */
066        public BudgetConstructionRequestMove() {
067    
068        }
069    
070        /**
071         * Gets the principalId attribute.
072         * 
073         * @return Returns the principalId
074         */
075        public String getPrincipalId() {
076            return principalId;
077        }
078    
079        /**
080         * Sets the principalId attribute.
081         * 
082         * @param principalId The principalId to set.
083         */
084        public void setPrincipalId(String principalId) {
085            this.principalId = principalId;
086        }
087    
088    
089        /**
090         * Gets the chartOfAccountsCode attribute.
091         * 
092         * @return Returns the chartOfAccountsCode
093         */
094        public String getChartOfAccountsCode() {
095            return chartOfAccountsCode;
096        }
097    
098        /**
099         * Sets the chartOfAccountsCode attribute.
100         * 
101         * @param chartOfAccountsCode The chartOfAccountsCode to set.
102         */
103        public void setChartOfAccountsCode(String chartOfAccountsCode) {
104            this.chartOfAccountsCode = chartOfAccountsCode;
105        }
106    
107    
108        /**
109         * Gets the accountNumber attribute.
110         * 
111         * @return Returns the accountNumber
112         */
113        public String getAccountNumber() {
114            return accountNumber;
115        }
116    
117        /**
118         * Sets the accountNumber attribute.
119         * 
120         * @param accountNumber The accountNumber to set.
121         */
122        public void setAccountNumber(String accountNumber) {
123            this.accountNumber = accountNumber;
124        }
125    
126    
127        /**
128         * Gets the subAccountNumber attribute.
129         * 
130         * @return Returns the subAccountNumber
131         */
132        public String getSubAccountNumber() {
133            return subAccountNumber;
134        }
135    
136        /**
137         * Sets the subAccountNumber attribute.
138         * 
139         * @param subAccountNumber The subAccountNumber to set.
140         */
141        public void setSubAccountNumber(String subAccountNumber) {
142            this.subAccountNumber = subAccountNumber;
143        }
144    
145    
146        /**
147         * Gets the financialObjectCode attribute.
148         * 
149         * @return Returns the financialObjectCode
150         */
151        public String getFinancialObjectCode() {
152            return financialObjectCode;
153        }
154    
155        /**
156         * Sets the financialObjectCode attribute.
157         * 
158         * @param financialObjectCode The financialObjectCode to set.
159         */
160        public void setFinancialObjectCode(String financialObjectCode) {
161            this.financialObjectCode = financialObjectCode;
162        }
163    
164    
165        /**
166         * Gets the financialSubObjectCode attribute.
167         * 
168         * @return Returns the financialSubObjectCode
169         */
170        public String getFinancialSubObjectCode() {
171            return financialSubObjectCode;
172        }
173    
174        /**
175         * Sets the financialSubObjectCode attribute.
176         * 
177         * @param financialSubObjectCode The financialSubObjectCode to set.
178         */
179        public void setFinancialSubObjectCode(String financialSubObjectCode) {
180            this.financialSubObjectCode = financialSubObjectCode;
181        }
182    
183    
184        /**
185         * Gets the financialObjectTypeCode attribute.
186         * 
187         * @return Returns the financialObjectTypeCode
188         */
189        public String getFinancialObjectTypeCode() {
190            return financialObjectTypeCode;
191        }
192    
193        /**
194         * Sets the financialObjectTypeCode attribute.
195         * 
196         * @param financialObjectTypeCode The financialObjectTypeCode to set.
197         */
198        public void setFinancialObjectTypeCode(String financialObjectTypeCode) {
199            this.financialObjectTypeCode = financialObjectTypeCode;
200        }
201    
202    
203        /**
204         * Gets the accountLineAnnualBalanceAmount attribute.
205         * 
206         * @return Returns the accountLineAnnualBalanceAmount.
207         */
208        public KualiInteger getAccountLineAnnualBalanceAmount() {
209            return accountLineAnnualBalanceAmount;
210        }
211    
212        /**
213         * Sets the accountLineAnnualBalanceAmount attribute value.
214         * 
215         * @param accountLineAnnualBalanceAmount The accountLineAnnualBalanceAmount to set.
216         */
217        public void setAccountLineAnnualBalanceAmount(KualiInteger accountLineAnnualBalanceAmount) {
218            this.accountLineAnnualBalanceAmount = accountLineAnnualBalanceAmount;
219        }
220    
221        /**
222         * Gets the requestUpdateErrorCode attribute.
223         * 
224         * @return Returns the requestUpdateErrorCode
225         */
226        public String getRequestUpdateErrorCode() {
227            return requestUpdateErrorCode;
228        }
229    
230        /**
231         * Sets the requestUpdateErrorCode attribute.
232         * 
233         * @param requestUpdateErrorCode The requestUpdateErrorCode to set.
234         */
235        public void setRequestUpdateErrorCode(String requestUpdateErrorCode) {
236            this.requestUpdateErrorCode = requestUpdateErrorCode;
237        }
238    
239    
240        /**
241         * Gets the financialDocumentMonth10LineAmount attribute.
242         * 
243         * @return Returns the financialDocumentMonth10LineAmount.
244         */
245        public KualiInteger getFinancialDocumentMonth10LineAmount() {
246            return financialDocumentMonth10LineAmount;
247        }
248    
249        /**
250         * Sets the financialDocumentMonth10LineAmount attribute value.
251         * 
252         * @param financialDocumentMonth10LineAmount The financialDocumentMonth10LineAmount to set.
253         */
254        public void setFinancialDocumentMonth10LineAmount(KualiInteger financialDocumentMonth10LineAmount) {
255            this.financialDocumentMonth10LineAmount = financialDocumentMonth10LineAmount;
256        }
257    
258        /**
259         * Gets the financialDocumentMonth11LineAmount attribute.
260         * 
261         * @return Returns the financialDocumentMonth11LineAmount.
262         */
263        public KualiInteger getFinancialDocumentMonth11LineAmount() {
264            return financialDocumentMonth11LineAmount;
265        }
266    
267        /**
268         * Sets the financialDocumentMonth11LineAmount attribute value.
269         * 
270         * @param financialDocumentMonth11LineAmount The financialDocumentMonth11LineAmount to set.
271         */
272        public void setFinancialDocumentMonth11LineAmount(KualiInteger financialDocumentMonth11LineAmount) {
273            this.financialDocumentMonth11LineAmount = financialDocumentMonth11LineAmount;
274        }
275    
276        /**
277         * Gets the financialDocumentMonth12LineAmount attribute.
278         * 
279         * @return Returns the financialDocumentMonth12LineAmount.
280         */
281        public KualiInteger getFinancialDocumentMonth12LineAmount() {
282            return financialDocumentMonth12LineAmount;
283        }
284    
285        /**
286         * Sets the financialDocumentMonth12LineAmount attribute value.
287         * 
288         * @param financialDocumentMonth12LineAmount The financialDocumentMonth12LineAmount to set.
289         */
290        public void setFinancialDocumentMonth12LineAmount(KualiInteger financialDocumentMonth12LineAmount) {
291            this.financialDocumentMonth12LineAmount = financialDocumentMonth12LineAmount;
292        }
293    
294        /**
295         * Gets the financialDocumentMonth1LineAmount attribute.
296         * 
297         * @return Returns the financialDocumentMonth1LineAmount.
298         */
299        public KualiInteger getFinancialDocumentMonth1LineAmount() {
300            return financialDocumentMonth1LineAmount;
301        }
302    
303        /**
304         * Sets the financialDocumentMonth1LineAmount attribute value.
305         * 
306         * @param financialDocumentMonth1LineAmount The financialDocumentMonth1LineAmount to set.
307         */
308        public void setFinancialDocumentMonth1LineAmount(KualiInteger financialDocumentMonth1LineAmount) {
309            this.financialDocumentMonth1LineAmount = financialDocumentMonth1LineAmount;
310        }
311    
312        /**
313         * Gets the financialDocumentMonth2LineAmount attribute.
314         * 
315         * @return Returns the financialDocumentMonth2LineAmount.
316         */
317        public KualiInteger getFinancialDocumentMonth2LineAmount() {
318            return financialDocumentMonth2LineAmount;
319        }
320    
321        /**
322         * Sets the financialDocumentMonth2LineAmount attribute value.
323         * 
324         * @param financialDocumentMonth2LineAmount The financialDocumentMonth2LineAmount to set.
325         */
326        public void setFinancialDocumentMonth2LineAmount(KualiInteger financialDocumentMonth2LineAmount) {
327            this.financialDocumentMonth2LineAmount = financialDocumentMonth2LineAmount;
328        }
329    
330        /**
331         * Gets the financialDocumentMonth3LineAmount attribute.
332         * 
333         * @return Returns the financialDocumentMonth3LineAmount.
334         */
335        public KualiInteger getFinancialDocumentMonth3LineAmount() {
336            return financialDocumentMonth3LineAmount;
337        }
338    
339        /**
340         * Sets the financialDocumentMonth3LineAmount attribute value.
341         * 
342         * @param financialDocumentMonth3LineAmount The financialDocumentMonth3LineAmount to set.
343         */
344        public void setFinancialDocumentMonth3LineAmount(KualiInteger financialDocumentMonth3LineAmount) {
345            this.financialDocumentMonth3LineAmount = financialDocumentMonth3LineAmount;
346        }
347    
348        /**
349         * Gets the financialDocumentMonth4LineAmount attribute.
350         * 
351         * @return Returns the financialDocumentMonth4LineAmount.
352         */
353        public KualiInteger getFinancialDocumentMonth4LineAmount() {
354            return financialDocumentMonth4LineAmount;
355        }
356    
357        /**
358         * Sets the financialDocumentMonth4LineAmount attribute value.
359         * 
360         * @param financialDocumentMonth4LineAmount The financialDocumentMonth4LineAmount to set.
361         */
362        public void setFinancialDocumentMonth4LineAmount(KualiInteger financialDocumentMonth4LineAmount) {
363            this.financialDocumentMonth4LineAmount = financialDocumentMonth4LineAmount;
364        }
365    
366        /**
367         * Gets the financialDocumentMonth5LineAmount attribute.
368         * 
369         * @return Returns the financialDocumentMonth5LineAmount.
370         */
371        public KualiInteger getFinancialDocumentMonth5LineAmount() {
372            return financialDocumentMonth5LineAmount;
373        }
374    
375        /**
376         * Sets the financialDocumentMonth5LineAmount attribute value.
377         * 
378         * @param financialDocumentMonth5LineAmount The financialDocumentMonth5LineAmount to set.
379         */
380        public void setFinancialDocumentMonth5LineAmount(KualiInteger financialDocumentMonth5LineAmount) {
381            this.financialDocumentMonth5LineAmount = financialDocumentMonth5LineAmount;
382        }
383    
384        /**
385         * Gets the financialDocumentMonth6LineAmount attribute.
386         * 
387         * @return Returns the financialDocumentMonth6LineAmount.
388         */
389        public KualiInteger getFinancialDocumentMonth6LineAmount() {
390            return financialDocumentMonth6LineAmount;
391        }
392    
393        /**
394         * Sets the financialDocumentMonth6LineAmount attribute value.
395         * 
396         * @param financialDocumentMonth6LineAmount The financialDocumentMonth6LineAmount to set.
397         */
398        public void setFinancialDocumentMonth6LineAmount(KualiInteger financialDocumentMonth6LineAmount) {
399            this.financialDocumentMonth6LineAmount = financialDocumentMonth6LineAmount;
400        }
401    
402        /**
403         * Gets the financialDocumentMonth7LineAmount attribute.
404         * 
405         * @return Returns the financialDocumentMonth7LineAmount.
406         */
407        public KualiInteger getFinancialDocumentMonth7LineAmount() {
408            return financialDocumentMonth7LineAmount;
409        }
410    
411        /**
412         * Sets the financialDocumentMonth7LineAmount attribute value.
413         * 
414         * @param financialDocumentMonth7LineAmount The financialDocumentMonth7LineAmount to set.
415         */
416        public void setFinancialDocumentMonth7LineAmount(KualiInteger financialDocumentMonth7LineAmount) {
417            this.financialDocumentMonth7LineAmount = financialDocumentMonth7LineAmount;
418        }
419    
420        /**
421         * Gets the financialDocumentMonth8LineAmount attribute.
422         * 
423         * @return Returns the financialDocumentMonth8LineAmount.
424         */
425        public KualiInteger getFinancialDocumentMonth8LineAmount() {
426            return financialDocumentMonth8LineAmount;
427        }
428    
429        /**
430         * Sets the financialDocumentMonth8LineAmount attribute value.
431         * 
432         * @param financialDocumentMonth8LineAmount The financialDocumentMonth8LineAmount to set.
433         */
434        public void setFinancialDocumentMonth8LineAmount(KualiInteger financialDocumentMonth8LineAmount) {
435            this.financialDocumentMonth8LineAmount = financialDocumentMonth8LineAmount;
436        }
437    
438        /**
439         * Gets the financialDocumentMonth9LineAmount attribute.
440         * 
441         * @return Returns the financialDocumentMonth9LineAmount.
442         */
443        public KualiInteger getFinancialDocumentMonth9LineAmount() {
444            return financialDocumentMonth9LineAmount;
445        }
446    
447        /**
448         * Sets the financialDocumentMonth9LineAmount attribute value.
449         * 
450         * @param financialDocumentMonth9LineAmount The financialDocumentMonth9LineAmount to set.
451         */
452        public void setFinancialDocumentMonth9LineAmount(KualiInteger financialDocumentMonth9LineAmount) {
453            this.financialDocumentMonth9LineAmount = financialDocumentMonth9LineAmount;
454        }
455    
456        /**
457         * Gets the chartOfAccounts attribute.
458         * 
459         * @return Returns the chartOfAccounts
460         */
461        public Chart getChartOfAccounts() {
462            return chartOfAccounts;
463        }
464        
465        /**
466         * returs true if user has access
467         * 
468         * @return
469         */
470        public boolean getHasAccess() {
471            return this.hasAccess;
472        }
473    
474        /**
475         * sets user access
476         * 
477         * @param hasAccess
478         */
479        public void setHasAccess(boolean hasAccess) {
480            this.hasAccess = hasAccess;
481        }
482        
483        /**
484         * returns true if record has lock
485         * 
486         * @return
487         */
488        public boolean getHasLock() {
489            return this.hasLock;
490        }
491        
492        /**
493         * sets has lock
494         * 
495         * @param hasLock
496         */
497        public void setHasLock(boolean hasLock) {
498            this.hasLock = hasLock;
499        }
500        
501        /**
502         * returns concatenated string of principalId, chart, account, subaccount
503         * 
504         * @return
505         */
506        public String getSubAccountingString() {
507            return principalId + "-" + chartOfAccountsCode + "-" + accountNumber + "-" + subAccountNumber;
508        }
509        
510        public String getErrorLinePrefixForLogFile() {
511            return "Line Key: " + chartOfAccountsCode + ", " + accountNumber + ", " + subAccountNumber + ", " + financialObjectCode + ", " + financialSubObjectCode;
512        }
513        
514        /**
515         * Sets the chartOfAccounts attribute.
516         * 
517         * @param chartOfAccounts The chartOfAccounts to set.
518         * @deprecated
519         */
520        public void setChartOfAccounts(Chart chartOfAccounts) {
521            this.chartOfAccounts = chartOfAccounts;
522        }
523    
524        /**
525         * Gets the account attribute.
526         * 
527         * @return Returns the account
528         */
529        public Account getAccount() {
530            return account;
531        }
532    
533        /**
534         * Sets the account attribute.
535         * 
536         * @param account The account to set.
537         * @deprecated
538         */
539        public void setAccount(Account account) {
540            this.account = account;
541        }
542    
543        /**
544         * Gets the objectType attribute.
545         * 
546         * @return Returns the objectType.
547         */
548        public ObjectType getObjectType() {
549            return objectType;
550        }
551    
552        /**
553         * Sets the objectType attribute value.
554         * 
555         * @param objectType The objectType to set.
556         * @deprecated
557         */
558        public void setObjectType(ObjectType objectType) {
559            this.objectType = objectType;
560        }
561    
562        /**
563         * Gets the subAccount attribute.
564         * 
565         * @return Returns the subAccount.
566         */
567        public SubAccount getSubAccount() {
568            return subAccount;
569        }
570    
571        /**
572         * Sets the subAccount attribute value.
573         * 
574         * @param subAccount The subAccount to set.
575         * @deprecated
576         */
577        public void setSubAccount(SubAccount subAccount) {
578            this.subAccount = subAccount;
579        }
580    
581        /**
582         * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
583         */
584        protected LinkedHashMap toStringMapper() {
585            LinkedHashMap m = new LinkedHashMap();
586            m.put("principalId", this.principalId);
587            m.put("chartOfAccountsCode", this.chartOfAccountsCode);
588            m.put("accountNumber", this.accountNumber);
589            m.put("subAccountNumber", this.subAccountNumber);
590            m.put("financialObjectCode", this.financialObjectCode);
591            m.put("financialSubObjectCode", this.financialSubObjectCode);
592            return m;
593        }
594    
595    }
596