1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  
17  package org.kuali.ole.coa.businessobject;
18  
19  import java.sql.Date;
20  import java.util.HashMap;
21  import java.util.Map;
22  
23  import org.apache.commons.lang.StringUtils;
24  import org.kuali.ole.sys.context.SpringContext;
25  import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
26  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
27  import org.kuali.rice.krad.service.KualiModuleService;
28  import org.kuali.rice.krad.service.ModuleService;
29  import org.kuali.rice.location.api.LocationConstants;
30  import org.kuali.rice.location.framework.campus.CampusEbo;
31  import org.kuali.rice.location.framework.country.CountryEbo;
32  
33  
34  
35  
36  public class PriorYearOrganization extends PersistableBusinessObjectBase implements MutableInactivatable {
37  
38      protected String chartOfAccountsCode;
39      protected String organizationCode;
40      protected String organizationManagerUniversalId;
41      protected String organizationName;
42      protected String responsibilityCenterCode;
43      protected String organizationPhysicalCampusCode;
44      protected String organizationTypeCode;
45      protected String organizationDefaultAccountNumber;
46      protected String organizationCityName;
47      protected String organizationStateCode;
48      protected String organizationZipCode;
49      protected Date organizationBeginDate;
50      protected Date organizationEndDate;
51      protected String reportsToChartOfAccountsCode;
52      protected String reportsToOrganizationCode;
53      protected boolean active;
54      protected boolean organizationInFinancialProcessingIndicator;
55      protected String organizationPlantAccountNumber;
56      protected String campusPlantAccountNumber;
57      protected String organizationPlantChartCode;
58      protected String campusPlantChartCode;
59      protected String organizationCountryCode;
60      protected String organizationLine1Address;
61      protected String organizationLine2Address;
62  
63      protected Chart chartOfAccounts;
64      protected Account organizationDefaultAccount;
65      protected Organization organization;
66      protected CampusEbo organizationPhysicalCampus;
67      protected Organization reportsToOrganization;
68      protected Chart reportsToChartOfAccounts;
69      protected Account organizationPlantAccount;
70      protected Account campusPlantAccount;
71      protected Chart organizationPlantChart;
72      protected Chart campusPlantChart;
73      protected CountryEbo organizationCountry;
74  
75      
76  
77  
78      public PriorYearOrganization() {
79  
80      }
81  
82      
83  
84  
85  
86  
87      public String getChartOfAccountsCode() {
88          return chartOfAccountsCode;
89      }
90  
91      
92  
93  
94  
95  
96      public void setChartOfAccountsCode(String chartOfAccountsCode) {
97          this.chartOfAccountsCode = chartOfAccountsCode;
98      }
99  
100 
101     
102 
103 
104 
105 
106     public String getOrganizationCode() {
107         return organizationCode;
108     }
109 
110     
111 
112 
113 
114 
115     public void setOrganizationCode(String organizationCode) {
116         this.organizationCode = organizationCode;
117     }
118 
119 
120     
121 
122 
123 
124 
125     public String getOrganizationManagerUniversalId() {
126         return organizationManagerUniversalId;
127     }
128 
129     
130 
131 
132 
133 
134     public void setOrganizationManagerUniversalId(String organizationManagerUniversalId) {
135         this.organizationManagerUniversalId = organizationManagerUniversalId;
136     }
137 
138 
139     
140 
141 
142 
143 
144     public String getOrganizationName() {
145         return organizationName;
146     }
147 
148     
149 
150 
151 
152 
153     public void setOrganizationName(String organizationName) {
154         this.organizationName = organizationName;
155     }
156 
157 
158     
159 
160 
161 
162 
163     public String getResponsibilityCenterCode() {
164         return responsibilityCenterCode;
165     }
166 
167     
168 
169 
170 
171 
172     public void setResponsibilityCenterCode(String responsibilityCenterCode) {
173         this.responsibilityCenterCode = responsibilityCenterCode;
174     }
175 
176 
177     
178 
179 
180 
181 
182     public String getOrganizationPhysicalCampusCode() {
183         return organizationPhysicalCampusCode;
184     }
185 
186     
187 
188 
189 
190 
191     public void setOrganizationPhysicalCampusCode(String organizationPhysicalCampusCode) {
192         this.organizationPhysicalCampusCode = organizationPhysicalCampusCode;
193     }
194 
195 
196     
197 
198 
199 
200 
201     public String getOrganizationTypeCode() {
202         return organizationTypeCode;
203     }
204 
205     
206 
207 
208 
209 
210     public void setOrganizationTypeCode(String organizationTypeCode) {
211         this.organizationTypeCode = organizationTypeCode;
212     }
213 
214 
215     
216 
217 
218 
219 
220     public String getOrganizationDefaultAccountNumber() {
221         return organizationDefaultAccountNumber;
222     }
223 
224     
225 
226 
227 
228 
229     public void setOrganizationDefaultAccountNumber(String organizationDefaultAccountNumber) {
230         this.organizationDefaultAccountNumber = organizationDefaultAccountNumber;
231     }
232 
233     
234 
235 
236 
237 
238     public String getOrganizationCityName() {
239         return organizationCityName;
240     }
241 
242     
243 
244 
245 
246 
247     public void setOrganizationCityName(String organizationCityName) {
248         this.organizationCityName = organizationCityName;
249     }
250 
251 
252     
253 
254 
255 
256 
257     public String getOrganizationStateCode() {
258         return organizationStateCode;
259     }
260 
261     
262 
263 
264 
265 
266     public void setOrganizationStateCode(String organizationStateCode) {
267         this.organizationStateCode = organizationStateCode;
268     }
269 
270 
271     
272 
273 
274 
275 
276     public String getOrganizationZipCode() {
277         return organizationZipCode;
278     }
279 
280     
281 
282 
283 
284 
285     public void setOrganizationZipCode(String organizationZipCode) {
286         this.organizationZipCode = organizationZipCode;
287     }
288 
289 
290     
291 
292 
293 
294 
295     public Date getOrganizationBeginDate() {
296         return organizationBeginDate;
297     }
298 
299     
300 
301 
302 
303 
304     public void setOrganizationBeginDate(Date organizationBeginDate) {
305         this.organizationBeginDate = organizationBeginDate;
306     }
307 
308 
309     
310 
311 
312 
313 
314     public Date getOrganizationEndDate() {
315         return organizationEndDate;
316     }
317 
318     
319 
320 
321 
322 
323     public void setOrganizationEndDate(Date organizationEndDate) {
324         this.organizationEndDate = organizationEndDate;
325     }
326 
327 
328     
329 
330 
331 
332 
333     public String getReportsToChartOfAccountsCode() {
334         return reportsToChartOfAccountsCode;
335     }
336 
337     
338 
339 
340 
341 
342     public void setReportsToChartOfAccountsCode(String reportsToChartOfAccountsCode) {
343         this.reportsToChartOfAccountsCode = reportsToChartOfAccountsCode;
344     }
345 
346 
347     
348 
349 
350 
351 
352     public String getReportsToOrganizationCode() {
353         return reportsToOrganizationCode;
354     }
355 
356     
357 
358 
359 
360 
361     public void setReportsToOrganizationCode(String reportsToOrganizationCode) {
362         this.reportsToOrganizationCode = reportsToOrganizationCode;
363     }
364 
365 
366     
367 
368 
369 
370 
371     @Override
372     public boolean isActive() {
373         return active;
374     }
375 
376 
377     
378 
379 
380 
381 
382     @Override
383     public void setActive(boolean active) {
384         this.active = active;
385     }
386 
387 
388     
389 
390 
391 
392 
393     public boolean isOrganizationInFinancialProcessingIndicator() {
394         return organizationInFinancialProcessingIndicator;
395     }
396 
397 
398     
399 
400 
401 
402 
403     public void setOrganizationInFinancialProcessingIndicator(boolean organizationInFinancialProcessingIndicator) {
404         this.organizationInFinancialProcessingIndicator = organizationInFinancialProcessingIndicator;
405     }
406 
407 
408     
409 
410 
411 
412 
413     public String getOrganizationPlantAccountNumber() {
414         return organizationPlantAccountNumber;
415     }
416 
417     
418 
419 
420 
421 
422     public void setOrganizationPlantAccountNumber(String organizationPlantAccountNumber) {
423         this.organizationPlantAccountNumber = organizationPlantAccountNumber;
424     }
425 
426 
427     
428 
429 
430 
431 
432     public String getCampusPlantAccountNumber() {
433         return campusPlantAccountNumber;
434     }
435 
436     
437 
438 
439 
440 
441     public void setCampusPlantAccountNumber(String campusPlantAccountNumber) {
442         this.campusPlantAccountNumber = campusPlantAccountNumber;
443     }
444 
445 
446     
447 
448 
449 
450 
451     public String getOrganizationPlantChartCode() {
452         return organizationPlantChartCode;
453     }
454 
455     
456 
457 
458 
459 
460     public void setOrganizationPlantChartCode(String organizationPlantChartCode) {
461         this.organizationPlantChartCode = organizationPlantChartCode;
462     }
463 
464 
465     
466 
467 
468 
469 
470     public String getCampusPlantChartCode() {
471         return campusPlantChartCode;
472     }
473 
474     
475 
476 
477 
478 
479     public void setCampusPlantChartCode(String campusPlantChartCode) {
480         this.campusPlantChartCode = campusPlantChartCode;
481     }
482 
483     
484 
485 
486 
487 
488     public String getOrganizationCountryCode() {
489         return organizationCountryCode;
490     }
491 
492     
493 
494 
495 
496 
497     public void setOrganizationCountryCode(String organizationCountryCode) {
498         this.organizationCountryCode = organizationCountryCode;
499     }
500 
501     
502 
503 
504 
505 
506     public String getOrganizationLine1Address() {
507         return organizationLine1Address;
508     }
509 
510     
511 
512 
513 
514 
515     public void setOrganizationLine1Address(String organizationLine1Address) {
516         this.organizationLine1Address = organizationLine1Address;
517     }
518 
519     
520 
521 
522 
523 
524     public String getOrganizationLine2Address() {
525         return organizationLine2Address;
526     }
527 
528     
529 
530 
531 
532 
533     public void setOrganizationLine2Address(String organizationLine2Address) {
534         this.organizationLine2Address = organizationLine2Address;
535     }
536 
537     
538 
539 
540 
541 
542     public Chart getChartOfAccounts() {
543         return chartOfAccounts;
544     }
545 
546     
547 
548 
549 
550 
551 
552     public void setChartOfAccounts(Chart chartOfAccounts) {
553         this.chartOfAccounts = chartOfAccounts;
554     }
555 
556     
557 
558 
559 
560 
561     public Account getOrganizationDefaultAccount() {
562         return organizationDefaultAccount;
563     }
564 
565     
566 
567 
568 
569 
570 
571     public void setOrganizationDefaultAccount(Account organizationDefaultAccount) {
572         this.organizationDefaultAccount = organizationDefaultAccount;
573     }
574 
575     
576 
577 
578 
579 
580     public Organization getOrganization() {
581         return organization;
582     }
583 
584     
585 
586 
587 
588 
589 
590     public void setOrganization(Organization organization) {
591         this.organization = organization;
592     }
593 
594     
595 
596 
597 
598 
599     public CampusEbo getOrganizationPhysicalCampus() {
600         if ( StringUtils.isBlank(organizationPhysicalCampusCode) ) {
601             organizationPhysicalCampus = null;
602         } else {
603             if ( organizationPhysicalCampus == null || !StringUtils.equals( organizationPhysicalCampus.getCode(),organizationPhysicalCampusCode) ) {
604                 ModuleService moduleService = SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(CampusEbo.class);
605                 if ( moduleService != null ) {
606                     Map<String,Object> keys = new HashMap<String, Object>(1);
607                     keys.put(LocationConstants.PrimaryKeyConstants.CODE, organizationPhysicalCampusCode);
608                     organizationPhysicalCampus = moduleService.getExternalizableBusinessObject(CampusEbo.class, keys);
609                 } else {
610                     throw new RuntimeException( "CONFIGURATION ERROR: No responsible module found for EBO class.  Unable to proceed." );
611                 }
612             }
613         }
614         return organizationPhysicalCampus;
615     }
616 
617     
618 
619 
620 
621 
622 
623     public void setOrganizationPhysicalCampus(CampusEbo organizationPhysicalCampus) {
624         this.organizationPhysicalCampus = organizationPhysicalCampus;
625     }
626 
627     
628 
629 
630 
631 
632     public Organization getReportsToOrganization() {
633         return reportsToOrganization;
634     }
635 
636     
637 
638 
639 
640 
641 
642     public void setReportsToOrganization(Organization reportsToOrganization) {
643         this.reportsToOrganization = reportsToOrganization;
644     }
645 
646     
647 
648 
649 
650 
651     public Chart getReportsToChartOfAccounts() {
652         return reportsToChartOfAccounts;
653     }
654 
655     
656 
657 
658 
659 
660 
661     public void setReportsToChartOfAccounts(Chart reportsToChartOfAccounts) {
662         this.reportsToChartOfAccounts = reportsToChartOfAccounts;
663     }
664 
665     
666 
667 
668 
669 
670     public Account getOrganizationPlantAccount() {
671         return organizationPlantAccount;
672     }
673 
674     
675 
676 
677 
678 
679 
680     public void setOrganizationPlantAccount(Account organizationPlantAccount) {
681         this.organizationPlantAccount = organizationPlantAccount;
682     }
683 
684     
685 
686 
687 
688 
689     public Account getCampusPlantAccount() {
690         return campusPlantAccount;
691     }
692 
693     
694 
695 
696 
697 
698 
699     public void setCampusPlantAccount(Account campusPlantAccount) {
700         this.campusPlantAccount = campusPlantAccount;
701     }
702 
703     
704 
705 
706 
707 
708     public Chart getOrganizationPlantChart() {
709         return organizationPlantChart;
710     }
711 
712     
713 
714 
715 
716 
717 
718     public void setOrganizationPlantChart(Chart organizationPlantChart) {
719         this.organizationPlantChart = organizationPlantChart;
720     }
721 
722     
723 
724 
725 
726 
727     public Chart getCampusPlantChart() {
728         return campusPlantChart;
729     }
730 
731     
732 
733 
734 
735 
736 
737     public void setCampusPlantChart(Chart campusPlantChart) {
738         this.campusPlantChart = campusPlantChart;
739     }
740 
741     
742 
743 
744 
745 
746     public CountryEbo getOrganizationCountry() {
747         if ( StringUtils.isBlank(organizationCountryCode) ) {
748             organizationCountry = null;
749         } else {
750             if ( organizationCountry == null || !StringUtils.equals( organizationCountry.getCode(),organizationCountryCode) ) {
751                 ModuleService moduleService = SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(CountryEbo.class);
752                 if ( moduleService != null ) {
753                     Map<String,Object> keys = new HashMap<String, Object>(1);
754                     keys.put(LocationConstants.PrimaryKeyConstants.CODE, organizationCountryCode);
755                     organizationCountry = moduleService.getExternalizableBusinessObject(CountryEbo.class, keys);
756                 } else {
757                     throw new RuntimeException( "CONFIGURATION ERROR: No responsible module found for EBO class.  Unable to proceed." );
758                 }
759             }
760         }
761         return organizationCountry;
762     }
763 
764     
765 
766 
767 
768 
769 
770     public void setOrganizationCountry(CountryEbo organizationCountry) {
771         this.organizationCountry = organizationCountry;
772     }
773 
774 }