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  
17  package org.kuali.ole.module.cg.businessobject;
18  
19  import java.sql.Date;
20  import java.sql.Timestamp;
21  import java.util.ArrayList;
22  import java.util.Collection;
23  import java.util.LinkedHashMap;
24  import java.util.List;
25  
26  import org.kuali.ole.coa.businessobject.CFDA;
27  import org.kuali.ole.integration.cg.ContractAndGrantsProposal;
28  import org.kuali.ole.sys.OLEConstants;
29  import org.kuali.ole.sys.context.SpringContext;
30  import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
31  import org.kuali.rice.core.api.util.type.KualiDecimal;
32  import org.kuali.rice.kim.api.identity.Person;
33  import org.kuali.rice.krad.bo.PersistableBusinessObject;
34  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
35  import org.kuali.rice.krad.service.LookupService;
36  import org.kuali.rice.krad.util.ObjectUtils;
37  
38  /**
39   * See functional documentation.
40   */
41  public class Proposal extends PersistableBusinessObjectBase implements MutableInactivatable, ContractAndGrantsProposal {
42  
43      private Long proposalNumber;
44      private Date proposalBeginningDate;
45      private Date proposalEndingDate;
46  
47      /**
48       * This field is for write-only to the database via OJB, not the corresponding property of this BO. OJB uses reflection to read
49       * it, so the compiler warns because it doesn't know.
50       *
51       * @see #getProposalTotalAmount
52       * @see #setProposalTotalAmount
53       */
54      @SuppressWarnings( { "unused" })
55      private KualiDecimal proposalTotalAmount;
56  
57      private KualiDecimal proposalDirectCostAmount;
58      private KualiDecimal proposalIndirectCostAmount;
59      private Date proposalRejectedDate;
60      private Timestamp proposalLastUpdateDate;
61      private Date proposalDueDate;
62      private KualiDecimal proposalTotalProjectAmount;
63      private Date proposalSubmissionDate;
64      private boolean proposalFederalPassThroughIndicator;
65      private String oldProposalNumber;
66      private String grantNumber;
67      private Date proposalClosingDate;
68      private String proposalAwardTypeCode;
69      private String agencyNumber;
70      private String proposalStatusCode;
71      private String federalPassThroughAgencyNumber;
72      private String cfdaNumber;
73      private String proposalFellowName;
74      private String proposalPurposeCode;
75      private String proposalProjectTitle;
76      private boolean active;
77      private List<ProposalSubcontractor> proposalSubcontractors;
78      private List<ProposalOrganization> proposalOrganizations;
79      private List<ProposalProjectDirector> proposalProjectDirectors;
80      private List<ProposalResearchRisk> proposalResearchRisks;
81  
82      private ProposalAwardType proposalAwardType;
83      private Agency agency;
84      private ProposalStatus proposalStatus;
85      private Agency federalPassThroughAgency;
86      private ProposalPurpose proposalPurpose;
87      private CFDA cfda;
88      private ProposalOrganization primaryProposalOrganization;
89      private String routingOrg;
90      private String routingChart;
91      private LookupService lookupService;
92      private Award award;
93  
94      /** Dummy value used to facilitate lookups */
95      private transient String lookupPersonUniversalIdentifier;
96      private transient Person lookupPerson;
97  
98  
99      private final String userLookupRoleNamespaceCode = OLEConstants.ParameterNamespaces.OLE;
100     private final String userLookupRoleName = OLEConstants.SysKimApiConstants.CONTRACTS_AND_GRANTS_PROJECT_DIRECTOR;
101 
102     /**
103      * Default constructor.
104      */
105     @SuppressWarnings( { "unchecked" })
106     public Proposal() {
107         // Must use TypedArrayList because its get() method automatically grows
108         // the array for Struts.
109         proposalSubcontractors = new ArrayList<ProposalSubcontractor>();
110         proposalOrganizations = new ArrayList<ProposalOrganization>();
111         proposalProjectDirectors = new ArrayList<ProposalProjectDirector>();
112         proposalResearchRisks = new ArrayList<ProposalResearchRisk>();
113     }
114 
115     /**
116      * Gets the award awarded to a proposal instance.
117      *
118      * @return the award corresponding to a proposal instance if the proposal has been awarded.
119      */
120     @Override
121     public Award getAward() {
122         return award;
123     }
124 
125     /**
126      * Sets the award awarding a proposal instance.
127      *
128      * @param award the award awarding a proposal instance
129      */
130     public void setAward(Award award) {
131         this.award = award;
132     }
133 
134     /**
135      * @see org.kuali.rice.krad.bo.PersistableBusinessObjectBase#buildListOfDeletionAwareLists()
136      */
137 
138     @Override
139     public List buildListOfDeletionAwareLists() {
140         List<Collection<PersistableBusinessObject>> managedLists = super.buildListOfDeletionAwareLists();
141         managedLists.add((List) getProposalSubcontractors());
142         managedLists.add((List) getProposalOrganizations());
143         managedLists.add((List)getProposalProjectDirectors());
144         // research risks cannot be deleted (nor added)
145         return managedLists;
146     }
147 
148     /**
149      * Gets the proposalNumber attribute.
150      *
151      * @return Returns the proposalNumber
152      */
153     @Override
154     public Long getProposalNumber() {
155         return proposalNumber;
156     }
157 
158     /**
159      * Sets the proposalNumber attribute.
160      *
161      * @param proposalNumber The proposalNumber to set.
162      */
163     public void setProposalNumber(Long proposalNumber) {
164         this.proposalNumber = proposalNumber;
165     }
166 
167     /**
168      * Gets the proposalBeginningDate attribute.
169      *
170      * @return Returns the proposalBeginningDate
171      */
172     @Override
173     public Date getProposalBeginningDate() {
174         return proposalBeginningDate;
175     }
176 
177     /**
178      * Sets the proposalBeginningDate attribute.
179      *
180      * @param proposalBeginningDate The proposalBeginningDate to set.
181      */
182     public void setProposalBeginningDate(Date proposalBeginningDate) {
183         this.proposalBeginningDate = proposalBeginningDate;
184     }
185 
186     /**
187      * Gets the proposalEndingDate attribute.
188      *
189      * @return Returns the proposalEndingDate
190      */
191     @Override
192     public Date getProposalEndingDate() {
193         return proposalEndingDate;
194     }
195 
196     /**
197      * Sets the proposalEndingDate attribute.
198      *
199      * @param proposalEndingDate The proposalEndingDate to set.
200      */
201     public void setProposalEndingDate(Date proposalEndingDate) {
202         this.proposalEndingDate = proposalEndingDate;
203     }
204 
205     /**
206      * Gets the proposalTotalAmount attribute.
207      *
208      * @return Returns the proposalTotalAmount
209      */
210     @Override
211     public KualiDecimal getProposalTotalAmount() {
212         KualiDecimal direct = getProposalDirectCostAmount();
213         KualiDecimal indirect = getProposalIndirectCostAmount();
214         return ObjectUtils.isNull(direct) || ObjectUtils.isNull(indirect) ? null : direct.add(indirect);
215     }
216 
217     /**
218      * Does nothing. This property is determined by the direct and indirect cost amounts. This setter is here only because without
219      * it, the maintenance framework won't display this attribute.
220      *
221      * @param proposalTotalAmount The proposalTotalAmount to set.
222      */
223     public void setProposalTotalAmount(KualiDecimal proposalTotalAmount) {
224         // do nothing
225     }
226 
227     /**
228      * OJB calls this method as the first operation before this BO is inserted into the database. The database contains
229      * CGPRPSL_TOT_AMT, a denormalized column that Kuali does not use but needs to maintain with this method because OJB bypasses
230      * the getter.
231      *
232      * @param persistenceBroker from OJB
233      * @throws PersistenceBrokerException
234      */
235     @Override protected void prePersist() {
236         super.prePersist();
237         proposalTotalAmount = getProposalTotalAmount();
238     }
239 
240     /**
241      * OJB calls this method as the first operation before this BO is updated to the database. The database contains
242      * CGPRPSL_TOT_AMT, a denormalized column that Kuali does not use but needs to maintain with this method because OJB bypasses
243      * the getter.
244      *
245      * @param persistenceBroker from OJB
246      * @throws PersistenceBrokerException
247      */
248     @Override protected void preUpdate() {
249         super.preUpdate();
250         proposalTotalAmount = getProposalTotalAmount();
251     }
252 
253     /**
254      * Gets the proposalDirectCostAmount attribute.
255      *
256      * @return Returns the proposalDirectCostAmount
257      */
258     @Override
259     public KualiDecimal getProposalDirectCostAmount() {
260         return proposalDirectCostAmount;
261     }
262 
263     /**
264      * Sets the proposalDirectCostAmount attribute.
265      *
266      * @param proposalDirectCostAmount The proposalDirectCostAmount to set.
267      */
268     public void setProposalDirectCostAmount(KualiDecimal proposalDirectCostAmount) {
269         this.proposalDirectCostAmount = proposalDirectCostAmount;
270     }
271 
272     /**
273      * Gets the proposalIndirectCostAmount attribute.
274      *
275      * @return Returns the proposalIndirectCostAmount
276      */
277     @Override
278     public KualiDecimal getProposalIndirectCostAmount() {
279         return proposalIndirectCostAmount;
280     }
281 
282     /**
283      * Sets the proposalIndirectCostAmount attribute.
284      *
285      * @param proposalIndirectCostAmount The proposalIndirectCostAmount to set.
286      */
287     public void setProposalIndirectCostAmount(KualiDecimal proposalIndirectCostAmount) {
288         this.proposalIndirectCostAmount = proposalIndirectCostAmount;
289     }
290 
291     /**
292      * Gets the proposalRejectedDate attribute.
293      *
294      * @return Returns the proposalRejectedDate
295      */
296     @Override
297     public Date getProposalRejectedDate() {
298         return proposalRejectedDate;
299     }
300 
301     /**
302      * Sets the proposalRejectedDate attribute.
303      *
304      * @param proposalRejectedDate The proposalRejectedDate to set.
305      */
306     public void setProposalRejectedDate(Date proposalRejectedDate) {
307         this.proposalRejectedDate = proposalRejectedDate;
308     }
309 
310     /**
311      * Gets the proposalLastUpdateDate attribute.
312      *
313      * @return Returns the proposalLastUpdateDate
314      */
315     @Override
316     public Timestamp getProposalLastUpdateDate() {
317         return proposalLastUpdateDate;
318     }
319 
320     /**
321      * Sets the proposalLastUpdateDate attribute.
322      *
323      * @param proposalLastUpdateDate The proposalLastUpdateDate to set.
324      */
325     public void setProposalLastUpdateDate(Timestamp proposalLastUpdateDate) {
326         this.proposalLastUpdateDate = proposalLastUpdateDate;
327     }
328 
329     /**
330      * Gets the proposalDueDate attribute.
331      *
332      * @return Returns the proposalDueDate
333      */
334     @Override
335     public Date getProposalDueDate() {
336         return proposalDueDate;
337     }
338 
339     /**
340      * Sets the proposalDueDate attribute.
341      *
342      * @param proposalDueDate The proposalDueDate to set.
343      */
344     public void setProposalDueDate(Date proposalDueDate) {
345         this.proposalDueDate = proposalDueDate;
346     }
347 
348     /**
349      * Gets the proposalTotalProjectAmount attribute.
350      *
351      * @return Returns the proposalTotalProjectAmount
352      */
353     @Override
354     public KualiDecimal getProposalTotalProjectAmount() {
355         return proposalTotalProjectAmount;
356     }
357 
358     /**
359      * Sets the proposalTotalProjectAmount attribute.
360      *
361      * @param proposalTotalProjectAmount The proposalTotalProjectAmount to set.
362      */
363     public void setProposalTotalProjectAmount(KualiDecimal proposalTotalProjectAmount) {
364         this.proposalTotalProjectAmount = proposalTotalProjectAmount;
365     }
366 
367     /**
368      * Gets the proposalSubmissionDate attribute.
369      *
370      * @return Returns the proposalSubmissionDate
371      */
372     @Override
373     public Date getProposalSubmissionDate() {
374         return proposalSubmissionDate;
375     }
376 
377     /**
378      * Sets the proposalSubmissionDate attribute.
379      *
380      * @param proposalSubmissionDate The proposalSubmissionDate to set.
381      */
382     public void setProposalSubmissionDate(Date proposalSubmissionDate) {
383         this.proposalSubmissionDate = proposalSubmissionDate;
384     }
385 
386     /**
387      * Gets the proposalFederalPassThroughIndicator attribute.
388      *
389      * @return Returns the proposalFederalPassThroughIndicator
390      */
391     @Override
392     public boolean getProposalFederalPassThroughIndicator() {
393         return proposalFederalPassThroughIndicator;
394     }
395 
396     /**
397      * Sets the proposalFederalPassThroughIndicator attribute.
398      *
399      * @param proposalFederalPassThroughIndicator The proposalFederalPassThroughIndicator to set.
400      */
401     public void setProposalFederalPassThroughIndicator(boolean proposalFederalPassThroughIndicator) {
402         this.proposalFederalPassThroughIndicator = proposalFederalPassThroughIndicator;
403     }
404 
405     /**
406      * Gets the oldProposalNumber attribute.
407      *
408      * @return Returns the oldProposalNumber
409      */
410     @Override
411     public String getOldProposalNumber() {
412         return oldProposalNumber;
413     }
414 
415     /**
416      * Sets the oldProposalNumber attribute.
417      *
418      * @param oldProposalNumber The oldProposalNumber to set.
419      */
420     public void setOldProposalNumber(String oldProposalNumber) {
421         this.oldProposalNumber = oldProposalNumber;
422     }
423 
424     /**
425      * Gets the grantNumber attribute.
426      *
427      * @return Returns the grantNumber
428      */
429     @Override
430     public String getGrantNumber() {
431         return grantNumber;
432     }
433 
434     /**
435      * Sets the grantNumber attribute.
436      *
437      * @param grantNumber The grantNumber to set.
438      */
439     public void setGrantNumber(String grantNumber) {
440         this.grantNumber = grantNumber;
441     }
442 
443     /**
444      * Gets the proposalClosingDate attribute.
445      *
446      * @return Returns the proposalClosingDate
447      */
448     @Override
449     public Date getProposalClosingDate() {
450         return proposalClosingDate;
451     }
452 
453     /**
454      * Sets the proposalClosingDate attribute.
455      *
456      * @param proposalClosingDate The proposalClosingDate to set.
457      */
458     public void setProposalClosingDate(Date proposalClosingDate) {
459         this.proposalClosingDate = proposalClosingDate;
460     }
461 
462     /**
463      * Gets the proposalAwardTypeCode attribute.
464      *
465      * @return Returns the proposalAwardTypeCode
466      */
467     @Override
468     public String getProposalAwardTypeCode() {
469         return proposalAwardTypeCode;
470     }
471 
472     /**
473      * Sets the proposalAwardTypeCode attribute.
474      *
475      * @param proposalAwardTypeCode The proposalAwardTypeCode to set.
476      */
477     public void setProposalAwardTypeCode(String proposalAwardTypeCode) {
478         this.proposalAwardTypeCode = proposalAwardTypeCode;
479     }
480 
481     /**
482      * Gets the agencyNumber attribute.
483      *
484      * @return Returns the agencyNumber
485      */
486     @Override
487     public String getAgencyNumber() {
488         return agencyNumber;
489     }
490 
491     /**
492      * Sets the agencyNumber attribute.
493      *
494      * @param agencyNumber The agencyNumber to set.
495      */
496     public void setAgencyNumber(String agencyNumber) {
497         this.agencyNumber = agencyNumber;
498     }
499 
500     /**
501      * Gets the proposalStatusCode attribute.
502      *
503      * @return Returns the proposalStatusCode
504      */
505     @Override
506     public String getProposalStatusCode() {
507         return proposalStatusCode;
508     }
509 
510     /**
511      * Sets the proposalStatusCode attribute.
512      *
513      * @param proposalStatusCode The proposalStatusCode to set.
514      */
515     public void setProposalStatusCode(String proposalStatusCode) {
516         this.proposalStatusCode = proposalStatusCode;
517     }
518 
519     /**
520      * Gets the federalPassThroughAgencyNumber attribute.
521      *
522      * @return Returns the federalPassThroughAgencyNumber
523      */
524     @Override
525     public String getFederalPassThroughAgencyNumber() {
526         return federalPassThroughAgencyNumber;
527     }
528 
529     /**
530      * Sets the federalPassThroughAgencyNumber attribute.
531      *
532      * @param federalPassThroughAgencyNumber The federalPassThroughAgencyNumber to set.
533      */
534     public void setFederalPassThroughAgencyNumber(String federalPassThroughAgencyNumber) {
535         this.federalPassThroughAgencyNumber = federalPassThroughAgencyNumber;
536     }
537 
538     /**
539      * Gets the cfdaNumber attribute.
540      *
541      * @return Returns the cfdaNumber
542      */
543     @Override
544     public String getCfdaNumber() {
545         return cfdaNumber;
546     }
547 
548     /**
549      * Sets the cfdaNumber attribute.
550      *
551      * @param cfdaNumber The cfdaNumber to set.
552      */
553     public void setCfdaNumber(String cfdaNumber) {
554         this.cfdaNumber = cfdaNumber;
555     }
556 
557     /**
558      * Gets the proposalFellowName attribute.
559      *
560      * @return Returns the proposalFellowName
561      */
562     @Override
563     public String getProposalFellowName() {
564         return proposalFellowName;
565     }
566 
567     /**
568      * Sets the proposalFellowName attribute.
569      *
570      * @param proposalFellowName The proposalFellowName to set.
571      */
572     public void setProposalFellowName(String proposalFellowName) {
573         this.proposalFellowName = proposalFellowName;
574     }
575 
576     /**
577      * Gets the proposalPurposeCode attribute.
578      *
579      * @return Returns the proposalPurposeCode
580      */
581     @Override
582     public String getProposalPurposeCode() {
583         return proposalPurposeCode;
584     }
585 
586     /**
587      * Sets the proposalPurposeCode attribute.
588      *
589      * @param proposalPurposeCode The proposalPurposeCode to set.
590      */
591     public void setProposalPurposeCode(String proposalPurposeCode) {
592         this.proposalPurposeCode = proposalPurposeCode;
593     }
594 
595     /**
596      * Gets the proposalProjectTitle attribute.
597      *
598      * @return Returns the proposalProjectTitle
599      */
600     @Override
601     public String getProposalProjectTitle() {
602         return proposalProjectTitle;
603     }
604 
605     /**
606      * Sets the proposalProjectTitle attribute.
607      *
608      * @param proposalProjectTitle The proposalProjectTitle to set.
609      */
610     public void setProposalProjectTitle(String proposalProjectTitle) {
611         this.proposalProjectTitle = proposalProjectTitle;
612     }
613 
614     /**
615      * Gets the active attribute.
616      *
617      * @return Returns the active.
618      */
619     @Override
620     public boolean isActive() {
621         return active;
622     }
623 
624     /**
625      * Sets the active attribute value.
626      *
627      * @param active The active to set.
628      */
629     @Override
630     public void setActive(boolean active) {
631         this.active = active;
632     }
633 
634     /**
635      * Gets the {@link ProposalAwardType} attribute.
636      *
637      * @return Returns the {@link ProposalAwardType}
638      */
639     public ProposalAwardType getProposalAwardType() {
640         return proposalAwardType;
641     }
642 
643     /**
644      * Sets the {@link ProposalAwardType} attribute.
645      *
646      * @param proposalAwardType The {@link ProposalAwardType} to set.
647      * @deprecated
648      */
649     @Deprecated
650     public void setProposalAwardType(ProposalAwardType proposalAwardType) {
651         this.proposalAwardType = proposalAwardType;
652     }
653 
654     /**
655      * Gets the {@link Agency} attribute.
656      *
657      * @return Returns the {@link Agency}
658      */
659     public Agency getAgency() {
660         return agency;
661     }
662 
663     /**
664      * Sets the {@link Agency} attribute.
665      *
666      * @param agency The {@link Agency} to set.
667      * @deprecated
668      */
669     @Deprecated
670     public void setAgency(Agency agency) {
671         this.agency = agency;
672     }
673 
674     /**
675      * Gets the {@link ProposalStatus} attribute.
676      *
677      * @return Returns the {@link ProposalStatus}
678      */
679     public ProposalStatus getProposalStatus() {
680         return proposalStatus;
681     }
682 
683     /**
684      * Sets the {@link ProposalStatus} attribute.
685      *
686      * @param proposalStatus The {@link ProposalStatus} to set.
687      * @deprecated
688      */
689     @Deprecated
690     public void setProposalStatus(ProposalStatus proposalStatus) {
691         this.proposalStatus = proposalStatus;
692     }
693 
694     /**
695      * Gets the federalPassThroughAgency attribute.
696      *
697      * @return Returns the federalPassThroughAgency
698      */
699     public Agency getFederalPassThroughAgency() {
700         return federalPassThroughAgency;
701     }
702 
703     /**
704      * Sets the federalPassThrough {@link Agency} attribute.
705      *
706      * @param federalPassThroughAgency The federalPassThrough {@link Agency} to set.
707      * @deprecated
708      */
709     @Deprecated
710     public void setFederalPassThroughAgency(Agency federalPassThroughAgency) {
711         this.federalPassThroughAgency = federalPassThroughAgency;
712     }
713 
714     /**
715      * Gets the {@link ProposalPurpose} attribute.
716      *
717      * @return Returns the proposalPurpose
718      */
719     public ProposalPurpose getProposalPurpose() {
720         return proposalPurpose;
721     }
722 
723     /**
724      * Sets the {@link ProposalPurpose} attribute.
725      *
726      * @param proposalPurpose The {@link ProposalPurpose} to set.
727      * @deprecated
728      */
729     @Deprecated
730     public void setProposalPurpose(ProposalPurpose proposalPurpose) {
731         this.proposalPurpose = proposalPurpose;
732     }
733 
734     /**
735      * Gets the {@link CFDA} attribute.
736      *
737      * @return Returns the {@link CFDA}
738      */
739     public CFDA getCfda() {
740         return cfda;
741     }
742 
743     /**
744      * Sets the {@link CFDA} attribute.
745      *
746      * @param cfda The {@link CFDA} to set.
747      * @deprecated
748      */
749     @Deprecated
750     public void setCfda(CFDA cfda) {
751         this.cfda = cfda;
752     }
753 
754     /**
755      * Gets the {@link List} of {@link ProposalSubcontractor}s associated with a {@link Proposal} instance.
756      *
757      * @return Returns the proposalSubcontractors list
758      */
759     public List<ProposalSubcontractor> getProposalSubcontractors() {
760         return proposalSubcontractors;
761     }
762 
763     /**
764      * Sets the {@link ProposalSubcontractor}s {@link List}.
765      *
766      * @param proposalSubcontractors The {@link ProposalSubcontractor}s {@link List} to set.
767      */
768     public void setProposalSubcontractors(List<ProposalSubcontractor> proposalSubcontractors) {
769         this.proposalSubcontractors = proposalSubcontractors;
770     }
771 
772     /**
773      * Gets the {@link List} of {@link ProposalOrganization}s associated with a {@link Proposal} instance.
774      *
775      * @return Returns the {@link ProposalOrganization}s.
776      */
777     public List<ProposalOrganization> getProposalOrganizations() {
778         return proposalOrganizations;
779     }
780 
781     /**
782      * @param proposalOrganizations The proposalOrganizations to set.
783      */
784     public void setProposalOrganizations(List<ProposalOrganization> proposalOrganizations) {
785         this.proposalOrganizations = proposalOrganizations;
786     }
787 
788     /**
789      * @return Returns the proposalProjectDirectors.
790      */
791     public List<ProposalProjectDirector> getProposalProjectDirectors() {
792         return proposalProjectDirectors;
793     }
794 
795     /**
796      * @param proposalProjectDirectors The proposalProjectDirectors to set.
797      */
798     public void setProposalProjectDirectors(List<ProposalProjectDirector> proposalProjectDirectors) {
799         this.proposalProjectDirectors = proposalProjectDirectors;
800     }
801 
802     /**
803      * @return Returns the proposalResearchRisks.
804      */
805     public List<ProposalResearchRisk> getProposalResearchRisks() {
806         return proposalResearchRisks;
807     }
808 
809     /**
810      * @return Returns the active proposalResearchRisks.
811      */
812     public List<ProposalResearchRisk> getActiveProposalResearchRisks() {
813         List<ProposalResearchRisk> activeRisks = new ArrayList<ProposalResearchRisk>();
814         for (ProposalResearchRisk risk : proposalResearchRisks) {
815             if (risk.isActive()) {
816                 activeRisks.add(risk);
817             }
818         }
819         return activeRisks;
820     }
821 
822 
823     /**
824      * @param proposalResearchRisks The proposalResearchRisks to set.
825      */
826     public void setProposalResearchRisks(List<ProposalResearchRisk> proposalResearchRisks) {
827         this.proposalResearchRisks = proposalResearchRisks;
828     }
829 
830     /**
831      * @see org.kuali.rice.krad.bo.BusinessObjectBase#toStringMapper()
832      */
833     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
834         LinkedHashMap<String, String> m = new LinkedHashMap<String, String>();
835         if (this.proposalNumber != null) {
836             m.put("proposalNumber", this.proposalNumber.toString());
837         }
838         return m;
839     }
840 
841     /**
842      * Gets the lookup {@link Person}.
843      *
844      * @return the lookup {@link Person}
845      */
846     public Person getLookupPerson() {
847         return lookupPerson;
848     }
849 
850     /**
851      * Sets the lookup {@link Person}
852      *
853      * @param lookupPerson
854      */
855     public void setLookupPerson(Person lookupPerson) {
856         this.lookupPerson = lookupPerson;
857     }
858 
859     /**
860      * Gets the universal user id of the lookup person.
861      *
862      * @return the id of the lookup person
863      */
864     public String getLookupPersonUniversalIdentifier() {
865         lookupPerson = SpringContext.getBean(org.kuali.rice.kim.api.identity.PersonService.class).updatePersonIfNecessary(lookupPersonUniversalIdentifier, lookupPerson);
866         return lookupPersonUniversalIdentifier;
867     }
868 
869     /**
870      * Sets the universal user id of the lookup person
871      *
872      * @param lookupPersonId the id of the lookup person
873      */
874     public void setLookupPersonUniversalIdentifier(String lookupPersonId) {
875         this.lookupPersonUniversalIdentifier = lookupPersonId;
876     }
877 
878     /**
879      * I added this getter to the BO to resolve KULCG-300. I'm not sure if this is actually needed by the code, but the framework
880      * breaks all lookups on the proposal maintenance doc without this getter.
881      *
882      * @return the {@link LookupService} used by the instance.
883      */
884     public LookupService getLookupService() {
885         return lookupService;
886     }
887 
888 
889     /**
890      * Gets the id of the routing {@link Chart}
891      *
892      * @return the id of the routing {@link Chart}
893      */
894     public String getRoutingChart() {
895         return routingChart;
896     }
897 
898     /**
899      * Sets the id of the routing {@link Chart}.
900      *
901      * @return the id of the routing {@link Chart}.
902      */
903     public void setRoutingChart(String routingChart) {
904         this.routingChart = routingChart;
905     }
906 
907     /**
908      * Gets the id of the routing {@link Org}.
909      *
910      * @return the id of the routing {@link Org}
911      */
912     public String getRoutingOrg() {
913         return routingOrg;
914     }
915 
916     /**
917      * Sets the id of the routing {@link Org}.
918      *
919      * @param the id of the routing {@link Org}
920      */
921     public void setRoutingOrg(String routingOrg) {
922         this.routingOrg = routingOrg;
923     }
924 
925     /**
926      * Gets the primary {@link ProposalOrganization} for a proposal.
927      *
928      * @return the primary {@link ProposalOrganization} for a proposal
929      */
930     public ProposalOrganization getPrimaryProposalOrganization() {
931         for (ProposalOrganization po : proposalOrganizations) {
932             if (po != null && po.isProposalPrimaryOrganizationIndicator()) {
933                 setPrimaryProposalOrganization(po);
934                 break;
935             }
936         }
937 
938         return primaryProposalOrganization;
939     }
940 
941     /**
942      * Sets the {@link LookupService}. For Spring compatibility.
943      *
944      * @param lookupService
945      */
946     public void setLookupService(LookupService lookupService) {
947         this.lookupService = lookupService;
948     }
949 
950     /**
951      * Sets the primary {@link ProposalOrganization} for a proposal
952      *
953      * @param primaryProposalOrganization
954      */
955     public void setPrimaryProposalOrganization(ProposalOrganization primaryProposalOrganization) {
956         this.primaryProposalOrganization = primaryProposalOrganization;
957         this.routingChart = primaryProposalOrganization.getChartOfAccountsCode();
958         this.routingOrg = primaryProposalOrganization.getOrganizationCode();
959     }
960 
961 
962     public String getUserLookupRoleNamespaceCode() {
963         return userLookupRoleNamespaceCode;
964     }
965 
966     public void setUserLookupRoleNamespaceCode(String userLookupRoleNamespaceCode) {
967     }
968 
969     public String getUserLookupRoleName() {
970         return userLookupRoleName;
971     }
972 
973     public void setUserLookupRoleName(String userLookupRoleName) {
974     }
975 }
976