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.coa.businessobject;
018    
019    import java.sql.Date;
020    import java.util.HashMap;
021    import java.util.LinkedHashMap;
022    import java.util.Map;
023    
024    import org.kuali.kfs.sys.context.SpringContext;
025    import org.kuali.rice.kns.bo.Campus;
026    import org.kuali.rice.kns.bo.Country;
027    import org.kuali.rice.kns.bo.Inactivateable;
028    import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
029    import org.kuali.rice.kns.service.CountryService;
030    import org.kuali.rice.kns.service.KualiModuleService;
031    import org.kuali.rice.kns.util.KNSPropertyConstants;
032    
033    /**
034     * 
035     */
036    public class PriorYearOrganization extends PersistableBusinessObjectBase implements Inactivateable {
037    
038        private String chartOfAccountsCode;
039        private String organizationCode;
040        private String organizationManagerUniversalId;
041        private String organizationName;
042        private String responsibilityCenterCode;
043        private String organizationPhysicalCampusCode;
044        private String organizationTypeCode;
045        private String organizationDefaultAccountNumber;
046        private String organizationCityName;
047        private String organizationStateCode;
048        private String organizationZipCode;
049        private Date organizationBeginDate;
050        private Date organizationEndDate;
051        private String reportsToChartOfAccountsCode;
052        private String reportsToOrganizationCode;
053        private boolean active;
054        private boolean organizationInFinancialProcessingIndicator;
055        private String organizationPlantAccountNumber;
056        private String campusPlantAccountNumber;
057        private String organizationPlantChartCode;
058        private String campusPlantChartCode;
059        private String organizationCountryCode;
060        private String organizationLine1Address;
061        private String organizationLine2Address;
062    
063        private Chart chartOfAccounts;
064        private Account organizationDefaultAccount;
065        private Organization organization;
066        private Campus organizationPhysicalCampus;
067        private Organization reportsToOrganization;
068        private Chart reportsToChartOfAccounts;
069        private Account organizationPlantAccount;
070        private Account campusPlantAccount;
071        private Chart organizationPlantChart;
072        private Chart campusPlantChart;
073        private Country organizationCountry;
074    
075        /**
076         * Default constructor.
077         */
078        public PriorYearOrganization() {
079    
080        }
081    
082        /**
083         * Gets the chartOfAccountsCode attribute.
084         * 
085         * @return Returns the chartOfAccountsCode
086         */
087        public String getChartOfAccountsCode() {
088            return chartOfAccountsCode;
089        }
090    
091        /**
092         * Sets the chartOfAccountsCode attribute.
093         * 
094         * @param chartOfAccountsCode The chartOfAccountsCode to set.
095         */
096        public void setChartOfAccountsCode(String chartOfAccountsCode) {
097            this.chartOfAccountsCode = chartOfAccountsCode;
098        }
099    
100    
101        /**
102         * Gets the organizationCode attribute.
103         * 
104         * @return Returns the organizationCode
105         */
106        public String getOrganizationCode() {
107            return organizationCode;
108        }
109    
110        /**
111         * Sets the organizationCode attribute.
112         * 
113         * @param organizationCode The organizationCode to set.
114         */
115        public void setOrganizationCode(String organizationCode) {
116            this.organizationCode = organizationCode;
117        }
118    
119    
120        /**
121         * Gets the organizationManagerUniversalId attribute.
122         * 
123         * @return Returns the organizationManagerUniversalId
124         */
125        public String getOrganizationManagerUniversalId() {
126            return organizationManagerUniversalId;
127        }
128    
129        /**
130         * Sets the organizationManagerUniversalId attribute.
131         * 
132         * @param organizationManagerUniversalId The organizationManagerUniversalId to set.
133         */
134        public void setOrganizationManagerUniversalId(String organizationManagerUniversalId) {
135            this.organizationManagerUniversalId = organizationManagerUniversalId;
136        }
137    
138    
139        /**
140         * Gets the organizationName attribute.
141         * 
142         * @return Returns the organizationName
143         */
144        public String getOrganizationName() {
145            return organizationName;
146        }
147    
148        /**
149         * Sets the organizationName attribute.
150         * 
151         * @param organizationName The organizationName to set.
152         */
153        public void setOrganizationName(String organizationName) {
154            this.organizationName = organizationName;
155        }
156    
157    
158        /**
159         * Gets the responsibilityCenterCode attribute.
160         * 
161         * @return Returns the responsibilityCenterCode
162         */
163        public String getResponsibilityCenterCode() {
164            return responsibilityCenterCode;
165        }
166    
167        /**
168         * Sets the responsibilityCenterCode attribute.
169         * 
170         * @param responsibilityCenterCode The responsibilityCenterCode to set.
171         */
172        public void setResponsibilityCenterCode(String responsibilityCenterCode) {
173            this.responsibilityCenterCode = responsibilityCenterCode;
174        }
175    
176    
177        /**
178         * Gets the organizationPhysicalCampusCode attribute.
179         * 
180         * @return Returns the organizationPhysicalCampusCode
181         */
182        public String getOrganizationPhysicalCampusCode() {
183            return organizationPhysicalCampusCode;
184        }
185    
186        /**
187         * Sets the organizationPhysicalCampusCode attribute.
188         * 
189         * @param organizationPhysicalCampusCode The organizationPhysicalCampusCode to set.
190         */
191        public void setOrganizationPhysicalCampusCode(String organizationPhysicalCampusCode) {
192            this.organizationPhysicalCampusCode = organizationPhysicalCampusCode;
193        }
194    
195    
196        /**
197         * Gets the organizationTypeCode attribute.
198         * 
199         * @return Returns the organizationTypeCode
200         */
201        public String getOrganizationTypeCode() {
202            return organizationTypeCode;
203        }
204    
205        /**
206         * Sets the organizationTypeCode attribute.
207         * 
208         * @param organizationTypeCode The organizationTypeCode to set.
209         */
210        public void setOrganizationTypeCode(String organizationTypeCode) {
211            this.organizationTypeCode = organizationTypeCode;
212        }
213    
214    
215        /**
216         * Gets the organizationDefaultAccountNumber attribute.
217         * 
218         * @return Returns the organizationDefaultAccountNumber
219         */
220        public String getOrganizationDefaultAccountNumber() {
221            return organizationDefaultAccountNumber;
222        }
223    
224        /**
225         * Sets the organizationDefaultAccountNumber attribute.
226         * 
227         * @param organizationDefaultAccountNumber The organizationDefaultAccountNumber to set.
228         */
229        public void setOrganizationDefaultAccountNumber(String organizationDefaultAccountNumber) {
230            this.organizationDefaultAccountNumber = organizationDefaultAccountNumber;
231        }
232    
233        /**
234         * Gets the organizationCityName attribute.
235         * 
236         * @return Returns the organizationCityName
237         */
238        public String getOrganizationCityName() {
239            return organizationCityName;
240        }
241    
242        /**
243         * Sets the organizationCityName attribute.
244         * 
245         * @param organizationCityName The organizationCityName to set.
246         */
247        public void setOrganizationCityName(String organizationCityName) {
248            this.organizationCityName = organizationCityName;
249        }
250    
251    
252        /**
253         * Gets the organizationStateCode attribute.
254         * 
255         * @return Returns the organizationStateCode
256         */
257        public String getOrganizationStateCode() {
258            return organizationStateCode;
259        }
260    
261        /**
262         * Sets the organizationStateCode attribute.
263         * 
264         * @param organizationStateCode The organizationStateCode to set.
265         */
266        public void setOrganizationStateCode(String organizationStateCode) {
267            this.organizationStateCode = organizationStateCode;
268        }
269    
270    
271        /**
272         * Gets the organizationZipCode attribute.
273         * 
274         * @return Returns the organizationZipCode
275         */
276        public String getOrganizationZipCode() {
277            return organizationZipCode;
278        }
279    
280        /**
281         * Sets the organizationZipCode attribute.
282         * 
283         * @param organizationZipCode The organizationZipCode to set.
284         */
285        public void setOrganizationZipCode(String organizationZipCode) {
286            this.organizationZipCode = organizationZipCode;
287        }
288    
289    
290        /**
291         * Gets the organizationBeginDate attribute.
292         * 
293         * @return Returns the organizationBeginDate
294         */
295        public Date getOrganizationBeginDate() {
296            return organizationBeginDate;
297        }
298    
299        /**
300         * Sets the organizationBeginDate attribute.
301         * 
302         * @param organizationBeginDate The organizationBeginDate to set.
303         */
304        public void setOrganizationBeginDate(Date organizationBeginDate) {
305            this.organizationBeginDate = organizationBeginDate;
306        }
307    
308    
309        /**
310         * Gets the organizationEndDate attribute.
311         * 
312         * @return Returns the organizationEndDate
313         */
314        public Date getOrganizationEndDate() {
315            return organizationEndDate;
316        }
317    
318        /**
319         * Sets the organizationEndDate attribute.
320         * 
321         * @param organizationEndDate The organizationEndDate to set.
322         */
323        public void setOrganizationEndDate(Date organizationEndDate) {
324            this.organizationEndDate = organizationEndDate;
325        }
326    
327    
328        /**
329         * Gets the reportsToChartOfAccountsCode attribute.
330         * 
331         * @return Returns the reportsToChartOfAccountsCode
332         */
333        public String getReportsToChartOfAccountsCode() {
334            return reportsToChartOfAccountsCode;
335        }
336    
337        /**
338         * Sets the reportsToChartOfAccountsCode attribute.
339         * 
340         * @param reportsToChartOfAccountsCode The reportsToChartOfAccountsCode to set.
341         */
342        public void setReportsToChartOfAccountsCode(String reportsToChartOfAccountsCode) {
343            this.reportsToChartOfAccountsCode = reportsToChartOfAccountsCode;
344        }
345    
346    
347        /**
348         * Gets the reportsToOrganizationCode attribute.
349         * 
350         * @return Returns the reportsToOrganizationCode
351         */
352        public String getReportsToOrganizationCode() {
353            return reportsToOrganizationCode;
354        }
355    
356        /**
357         * Sets the reportsToOrganizationCode attribute.
358         * 
359         * @param reportsToOrganizationCode The reportsToOrganizationCode to set.
360         */
361        public void setReportsToOrganizationCode(String reportsToOrganizationCode) {
362            this.reportsToOrganizationCode = reportsToOrganizationCode;
363        }
364    
365    
366        /**
367         * Gets the active attribute.
368         * 
369         * @return Returns the active
370         */
371        public boolean isActive() {
372            return active;
373        }
374    
375    
376        /**
377         * Sets the active attribute.
378         * 
379         * @param active The active to set.
380         */
381        public void setActive(boolean active) {
382            this.active = active;
383        }
384    
385    
386        /**
387         * Gets the organizationInFinancialProcessingIndicator attribute.
388         * 
389         * @return Returns the organizationInFinancialProcessingIndicator
390         */
391        public boolean isOrganizationInFinancialProcessingIndicator() {
392            return organizationInFinancialProcessingIndicator;
393        }
394    
395    
396        /**
397         * Sets the organizationInFinancialProcessingIndicator attribute.
398         * 
399         * @param organizationInFinancialProcessingIndicator The organizationInFinancialProcessingIndicator to set.
400         */
401        public void setOrganizationInFinancialProcessingIndicator(boolean organizationInFinancialProcessingIndicator) {
402            this.organizationInFinancialProcessingIndicator = organizationInFinancialProcessingIndicator;
403        }
404    
405    
406        /**
407         * Gets the organizationPlantAccountNumber attribute.
408         * 
409         * @return Returns the organizationPlantAccountNumber
410         */
411        public String getOrganizationPlantAccountNumber() {
412            return organizationPlantAccountNumber;
413        }
414    
415        /**
416         * Sets the organizationPlantAccountNumber attribute.
417         * 
418         * @param organizationPlantAccountNumber The organizationPlantAccountNumber to set.
419         */
420        public void setOrganizationPlantAccountNumber(String organizationPlantAccountNumber) {
421            this.organizationPlantAccountNumber = organizationPlantAccountNumber;
422        }
423    
424    
425        /**
426         * Gets the campusPlantAccountNumber attribute.
427         * 
428         * @return Returns the campusPlantAccountNumber
429         */
430        public String getCampusPlantAccountNumber() {
431            return campusPlantAccountNumber;
432        }
433    
434        /**
435         * Sets the campusPlantAccountNumber attribute.
436         * 
437         * @param campusPlantAccountNumber The campusPlantAccountNumber to set.
438         */
439        public void setCampusPlantAccountNumber(String campusPlantAccountNumber) {
440            this.campusPlantAccountNumber = campusPlantAccountNumber;
441        }
442    
443    
444        /**
445         * Gets the organizationPlantChartCode attribute.
446         * 
447         * @return Returns the organizationPlantChartCode
448         */
449        public String getOrganizationPlantChartCode() {
450            return organizationPlantChartCode;
451        }
452    
453        /**
454         * Sets the organizationPlantChartCode attribute.
455         * 
456         * @param organizationPlantChartCode The organizationPlantChartCode to set.
457         */
458        public void setOrganizationPlantChartCode(String organizationPlantChartCode) {
459            this.organizationPlantChartCode = organizationPlantChartCode;
460        }
461    
462    
463        /**
464         * Gets the campusPlantChartCode attribute.
465         * 
466         * @return Returns the campusPlantChartCode
467         */
468        public String getCampusPlantChartCode() {
469            return campusPlantChartCode;
470        }
471    
472        /**
473         * Sets the campusPlantChartCode attribute.
474         * 
475         * @param campusPlantChartCode The campusPlantChartCode to set.
476         */
477        public void setCampusPlantChartCode(String campusPlantChartCode) {
478            this.campusPlantChartCode = campusPlantChartCode;
479        }
480    
481        /**
482         * Gets the organizationCountryCode attribute.
483         * 
484         * @return Returns the organizationCountryCode.
485         */
486        public String getOrganizationCountryCode() {
487            return organizationCountryCode;
488        }
489    
490        /**
491         * Sets the organizationCountryCode attribute value.
492         * 
493         * @param organizationCountryCode The organizationCountryCode to set.
494         */
495        public void setOrganizationCountryCode(String organizationCountryCode) {
496            this.organizationCountryCode = organizationCountryCode;
497        }
498    
499        /**
500         * Gets the organizationLine1Address attribute.
501         * 
502         * @return Returns the organizationLine1Address.
503         */
504        public String getOrganizationLine1Address() {
505            return organizationLine1Address;
506        }
507    
508        /**
509         * Sets the organizationLine1Address attribute value.
510         * 
511         * @param organizationLine1Address The organizationLine1Address to set.
512         */
513        public void setOrganizationLine1Address(String organizationLine1Address) {
514            this.organizationLine1Address = organizationLine1Address;
515        }
516    
517        /**
518         * Gets the organizationLine2Address attribute.
519         * 
520         * @return Returns the organizationLine2Address.
521         */
522        public String getOrganizationLine2Address() {
523            return organizationLine2Address;
524        }
525    
526        /**
527         * Sets the organizationLine2Address attribute value.
528         * 
529         * @param organizationLine2Address The organizationLine2Address to set.
530         */
531        public void setOrganizationLine2Address(String organizationLine2Address) {
532            this.organizationLine2Address = organizationLine2Address;
533        }
534    
535        /**
536         * Gets the chartOfAccounts attribute.
537         * 
538         * @return Returns the chartOfAccounts
539         */
540        public Chart getChartOfAccounts() {
541            return chartOfAccounts;
542        }
543    
544        /**
545         * Sets the chartOfAccounts attribute.
546         * 
547         * @param chartOfAccounts The chartOfAccounts to set.
548         * @deprecated
549         */
550        public void setChartOfAccounts(Chart chartOfAccounts) {
551            this.chartOfAccounts = chartOfAccounts;
552        }
553    
554        /**
555         * Gets the organizationDefaultAccount attribute.
556         * 
557         * @return Returns the organizationDefaultAccount
558         */
559        public Account getOrganizationDefaultAccount() {
560            return organizationDefaultAccount;
561        }
562    
563        /**
564         * Sets the organizationDefaultAccount attribute.
565         * 
566         * @param organizationDefaultAccount The organizationDefaultAccount to set.
567         * @deprecated
568         */
569        public void setOrganizationDefaultAccount(Account organizationDefaultAccount) {
570            this.organizationDefaultAccount = organizationDefaultAccount;
571        }
572    
573        /**
574         * Gets the organization attribute.
575         * 
576         * @return Returns the organization
577         */
578        public Organization getOrganization() {
579            return organization;
580        }
581    
582        /**
583         * Sets the organization attribute.
584         * 
585         * @param organization The organization to set.
586         * @deprecated
587         */
588        public void setOrganization(Organization organization) {
589            this.organization = organization;
590        }
591    
592        /**
593         * Gets the organizationPhysicalCampus attribute.
594         * 
595         * @return Returns the organizationPhysicalCampus
596         */
597        public Campus getOrganizationPhysicalCampus() {
598            Map<String, Object> criteria = new HashMap<String, Object>();
599            criteria.put(KNSPropertyConstants.CAMPUS_CODE, organizationPhysicalCampusCode);
600            return organizationPhysicalCampus = (Campus) SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(Campus.class).getExternalizableBusinessObject(Campus.class, criteria);
601        }
602    
603        /**
604         * Sets the organizationPhysicalCampus attribute.
605         * 
606         * @param organizationPhysicalCampus The organizationPhysicalCampus to set.
607         * @deprecated
608         */
609        public void setOrganizationPhysicalCampus(Campus organizationPhysicalCampus) {
610            this.organizationPhysicalCampus = organizationPhysicalCampus;
611        }
612    
613        /**
614         * Gets the reportsToOrganization attribute.
615         * 
616         * @return Returns the reportsToOrganization
617         */
618        public Organization getReportsToOrganization() {
619            return reportsToOrganization;
620        }
621    
622        /**
623         * Sets the reportsToOrganization attribute.
624         * 
625         * @param reportsToOrganization The reportsToOrganization to set.
626         * @deprecated
627         */
628        public void setReportsToOrganization(Organization reportsToOrganization) {
629            this.reportsToOrganization = reportsToOrganization;
630        }
631    
632        /**
633         * Gets the reportsToChartOfAccounts attribute.
634         * 
635         * @return Returns the reportsToChartOfAccounts
636         */
637        public Chart getReportsToChartOfAccounts() {
638            return reportsToChartOfAccounts;
639        }
640    
641        /**
642         * Sets the reportsToChartOfAccounts attribute.
643         * 
644         * @param reportsToChartOfAccounts The reportsToChartOfAccounts to set.
645         * @deprecated
646         */
647        public void setReportsToChartOfAccounts(Chart reportsToChartOfAccounts) {
648            this.reportsToChartOfAccounts = reportsToChartOfAccounts;
649        }
650    
651        /**
652         * Gets the organizationPlantAccount attribute.
653         * 
654         * @return Returns the organizationPlantAccount
655         */
656        public Account getOrganizationPlantAccount() {
657            return organizationPlantAccount;
658        }
659    
660        /**
661         * Sets the organizationPlantAccount attribute.
662         * 
663         * @param organizationPlantAccount The organizationPlantAccount to set.
664         * @deprecated
665         */
666        public void setOrganizationPlantAccount(Account organizationPlantAccount) {
667            this.organizationPlantAccount = organizationPlantAccount;
668        }
669    
670        /**
671         * Gets the campusPlantAccount attribute.
672         * 
673         * @return Returns the campusPlantAccount
674         */
675        public Account getCampusPlantAccount() {
676            return campusPlantAccount;
677        }
678    
679        /**
680         * Sets the campusPlantAccount attribute.
681         * 
682         * @param campusPlantAccount The campusPlantAccount to set.
683         * @deprecated
684         */
685        public void setCampusPlantAccount(Account campusPlantAccount) {
686            this.campusPlantAccount = campusPlantAccount;
687        }
688    
689        /**
690         * Gets the organizationPlantChart attribute.
691         * 
692         * @return Returns the organizationPlantChart
693         */
694        public Chart getOrganizationPlantChart() {
695            return organizationPlantChart;
696        }
697    
698        /**
699         * Sets the organizationPlantChart attribute.
700         * 
701         * @param organizationPlantChart The organizationPlantChart to set.
702         * @deprecated
703         */
704        public void setOrganizationPlantChart(Chart organizationPlantChart) {
705            this.organizationPlantChart = organizationPlantChart;
706        }
707    
708        /**
709         * Gets the campusPlantChart attribute.
710         * 
711         * @return Returns the campusPlantChart
712         */
713        public Chart getCampusPlantChart() {
714            return campusPlantChart;
715        }
716    
717        /**
718         * Sets the campusPlantChart attribute.
719         * 
720         * @param campusPlantChart The campusPlantChart to set.
721         * @deprecated
722         */
723        public void setCampusPlantChart(Chart campusPlantChart) {
724            this.campusPlantChart = campusPlantChart;
725        }
726    
727        /**
728         * Gets the organizationCountry attribute.
729         * 
730         * @return Returns the organizationCountry.
731         */
732        public Country getOrganizationCountry() {
733            organizationCountry = SpringContext.getBean(CountryService.class).getByPrimaryIdIfNecessary(organizationCountryCode, organizationCountry);
734            return organizationCountry;
735        }
736    
737        /**
738         * Sets the organizationCountry attribute value.
739         * 
740         * @param organizationCountry The organizationCountry to set.
741         * @deprecated
742         */
743        public void setOrganizationCountry(Country organizationCountry) {
744            this.organizationCountry = organizationCountry;
745        }
746    
747        /**
748         * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
749         */
750        protected LinkedHashMap toStringMapper() {
751            LinkedHashMap m = new LinkedHashMap();
752            m.put("chartOfAccountsCode", this.chartOfAccountsCode);
753            m.put("organizationCode", this.organizationCode);
754            return m;
755        }
756    }