Source Code Cross Referenced for Proposal.java in  » ERP-CRM-Financial » Kuali-Financial-System » org » kuali » module » cg » bo » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » Kuali Financial System » org.kuali.module.cg.bo 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2006-2007 The Kuali Foundation.
003:         * 
004:         * Licensed under the Educational Community License, Version 1.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/ecl1.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.module.cg.bo;
018:
019:        import java.sql.Date;
020:        import java.util.LinkedHashMap;
021:        import java.util.List;
022:
023:        import org.apache.ojb.broker.PersistenceBroker;
024:        import org.apache.ojb.broker.PersistenceBrokerException;
025:        import org.kuali.core.bo.PersistableBusinessObjectBase;
026:        import org.kuali.core.bo.user.UniversalUser;
027:        import org.kuali.core.service.LookupService;
028:        import org.kuali.core.service.UniversalUserService;
029:        import org.kuali.core.util.KualiDecimal;
030:        import org.kuali.core.util.ObjectUtils;
031:        import org.kuali.core.util.TypedArrayList;
032:        import org.kuali.kfs.context.SpringContext;
033:        import org.kuali.workflow.attribute.AlternateOrgReviewRouting;
034:
035:        /**
036:         * See functional documentation.
037:         */
038:        public class Proposal extends PersistableBusinessObjectBase implements 
039:                AlternateOrgReviewRouting {
040:
041:            public static final String PROPOSAL_CODE = "P";
042:            public static final String AWARD_CODE = "A";
043:            private Long proposalNumber;
044:            private Date proposalBeginningDate;
045:            private Date proposalEndingDate;
046:
047:            /**
048:             * This field is for write-only to the database via OJB, not the corresponding property of this BO. OJB uses reflection to read
049:             * it, so the compiler warns because it doesn't know.
050:             * 
051:             * @see #getProposalTotalAmount
052:             * @see #setProposalTotalAmount
053:             */
054:            @SuppressWarnings({"unused"})
055:            private KualiDecimal proposalTotalAmount;
056:
057:            private KualiDecimal proposalDirectCostAmount;
058:            private KualiDecimal proposalIndirectCostAmount;
059:            private Date proposalRejectedDate;
060:            private Date proposalLastUpdateDate;
061:            private Date proposalDueDate;
062:            private KualiDecimal proposalTotalProjectAmount;
063:            private Date proposalSubmissionDate;
064:            private boolean proposalFederalPassThroughIndicator;
065:            private String oldProposalNumber;
066:            private String grantNumber;
067:            private Date proposalClosingDate;
068:            private String proposalAwardTypeCode;
069:            private String agencyNumber;
070:            private String proposalStatusCode;
071:            private String federalPassThroughAgencyNumber;
072:            private String cfdaNumber;
073:            private String proposalFellowName;
074:            private String proposalPurposeCode;
075:            private String proposalProjectTitle;
076:            private boolean active;
077:            private List<ProposalSubcontractor> proposalSubcontractors;
078:            private List<ProposalOrganization> proposalOrganizations;
079:            private List<ProposalProjectDirector> proposalProjectDirectors;
080:            private List<ProposalResearchRisk> proposalResearchRisks;
081:
082:            private ProposalAwardType proposalAwardType;
083:            private Agency agency;
084:            private ProposalStatus proposalStatus;
085:            private Agency federalPassThroughAgency;
086:            private ProposalPurpose proposalPurpose;
087:            private Cfda cfda;
088:            private ProposalOrganization primaryProposalOrganization;
089:            private String routingOrg;
090:            private String routingChart;
091:            private LookupService lookupService;
092:            private Award award;
093:
094:            /**
095:             * Default constructor.
096:             */
097:            @SuppressWarnings({"unchecked"})
098:            public Proposal() {
099:                // Must use TypedArrayList because its get() method automatically grows
100:                // the array for Struts.
101:                proposalSubcontractors = new TypedArrayList(
102:                        ProposalSubcontractor.class);
103:                proposalOrganizations = new TypedArrayList(
104:                        ProposalOrganization.class);
105:                proposalProjectDirectors = new TypedArrayList(
106:                        ProposalProjectDirector.class);
107:                proposalResearchRisks = new TypedArrayList(
108:                        ProposalResearchRisk.class);
109:            }
110:
111:            /**
112:             * Gets the award awarded to a proposal instance.
113:             * 
114:             * @return the award corresponding to a proposal instance if the proposal has been awarded.
115:             */
116:            public Award getAward() {
117:                return award;
118:            }
119:
120:            /**
121:             * Sets the award awarding a proposal instance.
122:             * 
123:             * @param award the award awarding a proposal instance
124:             */
125:            public void setAward(Award award) {
126:                this .award = award;
127:            }
128:
129:            /**
130:             * @see org.kuali.core.bo.PersistableBusinessObjectBase#buildListOfDeletionAwareLists()
131:             */
132:            @Override
133:            public List buildListOfDeletionAwareLists() {
134:                List<List> managedLists = super .buildListOfDeletionAwareLists();
135:                managedLists.add(getProposalSubcontractors());
136:                managedLists.add(getProposalOrganizations());
137:                managedLists.add(getProposalProjectDirectors());
138:                // research risks cannot be deleted (nor added)
139:                return managedLists;
140:            }
141:
142:            /**
143:             * Gets the proposalNumber attribute.
144:             * 
145:             * @return Returns the proposalNumber
146:             */
147:            public Long getProposalNumber() {
148:                return proposalNumber;
149:            }
150:
151:            /**
152:             * Sets the proposalNumber attribute.
153:             * 
154:             * @param proposalNumber The proposalNumber to set.
155:             */
156:            public void setProposalNumber(Long proposalNumber) {
157:                this .proposalNumber = proposalNumber;
158:            }
159:
160:            /**
161:             * Gets the proposalBeginningDate attribute.
162:             * 
163:             * @return Returns the proposalBeginningDate
164:             */
165:            public Date getProposalBeginningDate() {
166:                return proposalBeginningDate;
167:            }
168:
169:            /**
170:             * Sets the proposalBeginningDate attribute.
171:             * 
172:             * @param proposalBeginningDate The proposalBeginningDate to set.
173:             */
174:            public void setProposalBeginningDate(Date proposalBeginningDate) {
175:                this .proposalBeginningDate = proposalBeginningDate;
176:            }
177:
178:            /**
179:             * Gets the proposalEndingDate attribute.
180:             * 
181:             * @return Returns the proposalEndingDate
182:             */
183:            public Date getProposalEndingDate() {
184:                return proposalEndingDate;
185:            }
186:
187:            /**
188:             * Sets the proposalEndingDate attribute.
189:             * 
190:             * @param proposalEndingDate The proposalEndingDate to set.
191:             */
192:            public void setProposalEndingDate(Date proposalEndingDate) {
193:                this .proposalEndingDate = proposalEndingDate;
194:            }
195:
196:            /**
197:             * Gets the proposalTotalAmount attribute.
198:             * 
199:             * @return Returns the proposalTotalAmount
200:             */
201:            public KualiDecimal getProposalTotalAmount() {
202:                KualiDecimal direct = getProposalDirectCostAmount();
203:                KualiDecimal indirect = getProposalIndirectCostAmount();
204:                return ObjectUtils.isNull(direct)
205:                        || ObjectUtils.isNull(indirect) ? null : direct
206:                        .add(indirect);
207:            }
208:
209:            /**
210:             * Does nothing. This property is determined by the direct and indirect cost amounts. This setter is here only because without
211:             * it, the maintenance framework won't display this attribute.
212:             * 
213:             * @param proposalTotalAmount The proposalTotalAmount to set.
214:             */
215:            public void setProposalTotalAmount(KualiDecimal proposalTotalAmount) {
216:                // do nothing
217:            }
218:
219:            /**
220:             * OJB calls this method as the first operation before this BO is inserted into the database. The database contains
221:             * CGPRPSL_TOT_AMT, a denormalized column that Kuali does not use but needs to maintain with this method because OJB bypasses
222:             * the getter.
223:             * 
224:             * @param persistenceBroker from OJB
225:             * @throws PersistenceBrokerException
226:             */
227:            @Override
228:            public void beforeInsert(PersistenceBroker persistenceBroker)
229:                    throws PersistenceBrokerException {
230:                super .beforeInsert(persistenceBroker);
231:                proposalTotalAmount = getProposalTotalAmount();
232:            }
233:
234:            /**
235:             * OJB calls this method as the first operation before this BO is updated to the database. The database contains
236:             * CGPRPSL_TOT_AMT, a denormalized column that Kuali does not use but needs to maintain with this method because OJB bypasses
237:             * the getter.
238:             * 
239:             * @param persistenceBroker from OJB
240:             * @throws PersistenceBrokerException
241:             */
242:            @Override
243:            public void beforeUpdate(PersistenceBroker persistenceBroker)
244:                    throws PersistenceBrokerException {
245:                super .beforeUpdate(persistenceBroker);
246:                proposalTotalAmount = getProposalTotalAmount();
247:            }
248:
249:            /**
250:             * Gets the proposalDirectCostAmount attribute.
251:             * 
252:             * @return Returns the proposalDirectCostAmount
253:             */
254:            public KualiDecimal getProposalDirectCostAmount() {
255:                return proposalDirectCostAmount;
256:            }
257:
258:            /**
259:             * Sets the proposalDirectCostAmount attribute.
260:             * 
261:             * @param proposalDirectCostAmount The proposalDirectCostAmount to set.
262:             */
263:            public void setProposalDirectCostAmount(
264:                    KualiDecimal proposalDirectCostAmount) {
265:                this .proposalDirectCostAmount = proposalDirectCostAmount;
266:            }
267:
268:            /**
269:             * Gets the proposalIndirectCostAmount attribute.
270:             * 
271:             * @return Returns the proposalIndirectCostAmount
272:             */
273:            public KualiDecimal getProposalIndirectCostAmount() {
274:                return proposalIndirectCostAmount;
275:            }
276:
277:            /**
278:             * Sets the proposalIndirectCostAmount attribute.
279:             * 
280:             * @param proposalIndirectCostAmount The proposalIndirectCostAmount to set.
281:             */
282:            public void setProposalIndirectCostAmount(
283:                    KualiDecimal proposalIndirectCostAmount) {
284:                this .proposalIndirectCostAmount = proposalIndirectCostAmount;
285:            }
286:
287:            /**
288:             * Gets the proposalRejectedDate attribute.
289:             * 
290:             * @return Returns the proposalRejectedDate
291:             */
292:            public Date getProposalRejectedDate() {
293:                return proposalRejectedDate;
294:            }
295:
296:            /**
297:             * Sets the proposalRejectedDate attribute.
298:             * 
299:             * @param proposalRejectedDate The proposalRejectedDate to set.
300:             */
301:            public void setProposalRejectedDate(Date proposalRejectedDate) {
302:                this .proposalRejectedDate = proposalRejectedDate;
303:            }
304:
305:            /**
306:             * Gets the proposalLastUpdateDate attribute.
307:             * 
308:             * @return Returns the proposalLastUpdateDate
309:             */
310:            public Date getProposalLastUpdateDate() {
311:                return proposalLastUpdateDate;
312:            }
313:
314:            /**
315:             * Sets the proposalLastUpdateDate attribute.
316:             * 
317:             * @param proposalLastUpdateDate The proposalLastUpdateDate to set.
318:             */
319:            public void setProposalLastUpdateDate(Date proposalLastUpdateDate) {
320:                this .proposalLastUpdateDate = proposalLastUpdateDate;
321:            }
322:
323:            /**
324:             * Gets the proposalDueDate attribute.
325:             * 
326:             * @return Returns the proposalDueDate
327:             */
328:            public Date getProposalDueDate() {
329:                return proposalDueDate;
330:            }
331:
332:            /**
333:             * Sets the proposalDueDate attribute.
334:             * 
335:             * @param proposalDueDate The proposalDueDate to set.
336:             */
337:            public void setProposalDueDate(Date proposalDueDate) {
338:                this .proposalDueDate = proposalDueDate;
339:            }
340:
341:            /**
342:             * Gets the proposalTotalProjectAmount attribute.
343:             * 
344:             * @return Returns the proposalTotalProjectAmount
345:             */
346:            public KualiDecimal getProposalTotalProjectAmount() {
347:                return proposalTotalProjectAmount;
348:            }
349:
350:            /**
351:             * Sets the proposalTotalProjectAmount attribute.
352:             * 
353:             * @param proposalTotalProjectAmount The proposalTotalProjectAmount to set.
354:             */
355:            public void setProposalTotalProjectAmount(
356:                    KualiDecimal proposalTotalProjectAmount) {
357:                this .proposalTotalProjectAmount = proposalTotalProjectAmount;
358:            }
359:
360:            /**
361:             * Gets the proposalSubmissionDate attribute.
362:             * 
363:             * @return Returns the proposalSubmissionDate
364:             */
365:            public Date getProposalSubmissionDate() {
366:                return proposalSubmissionDate;
367:            }
368:
369:            /**
370:             * Sets the proposalSubmissionDate attribute.
371:             * 
372:             * @param proposalSubmissionDate The proposalSubmissionDate to set.
373:             */
374:            public void setProposalSubmissionDate(Date proposalSubmissionDate) {
375:                this .proposalSubmissionDate = proposalSubmissionDate;
376:            }
377:
378:            /**
379:             * Gets the proposalFederalPassThroughIndicator attribute.
380:             * 
381:             * @return Returns the proposalFederalPassThroughIndicator
382:             */
383:            public boolean getProposalFederalPassThroughIndicator() {
384:                return proposalFederalPassThroughIndicator;
385:            }
386:
387:            /**
388:             * Sets the proposalFederalPassThroughIndicator attribute.
389:             * 
390:             * @param proposalFederalPassThroughIndicator The proposalFederalPassThroughIndicator to set.
391:             */
392:            public void setProposalFederalPassThroughIndicator(
393:                    boolean proposalFederalPassThroughIndicator) {
394:                this .proposalFederalPassThroughIndicator = proposalFederalPassThroughIndicator;
395:            }
396:
397:            /**
398:             * Gets the oldProposalNumber attribute.
399:             * 
400:             * @return Returns the oldProposalNumber
401:             */
402:            public String getOldProposalNumber() {
403:                return oldProposalNumber;
404:            }
405:
406:            /**
407:             * Sets the oldProposalNumber attribute.
408:             * 
409:             * @param oldProposalNumber The oldProposalNumber to set.
410:             */
411:            public void setOldProposalNumber(String oldProposalNumber) {
412:                this .oldProposalNumber = oldProposalNumber;
413:            }
414:
415:            /**
416:             * Gets the grantNumber attribute.
417:             * 
418:             * @return Returns the grantNumber
419:             */
420:            public String getGrantNumber() {
421:                return grantNumber;
422:            }
423:
424:            /**
425:             * Sets the grantNumber attribute.
426:             * 
427:             * @param grantNumber The grantNumber to set.
428:             */
429:            public void setGrantNumber(String grantNumber) {
430:                this .grantNumber = grantNumber;
431:            }
432:
433:            /**
434:             * Gets the proposalClosingDate attribute.
435:             * 
436:             * @return Returns the proposalClosingDate
437:             */
438:            public Date getProposalClosingDate() {
439:                return proposalClosingDate;
440:            }
441:
442:            /**
443:             * Sets the proposalClosingDate attribute.
444:             * 
445:             * @param proposalClosingDate The proposalClosingDate to set.
446:             */
447:            public void setProposalClosingDate(Date proposalClosingDate) {
448:                this .proposalClosingDate = proposalClosingDate;
449:            }
450:
451:            /**
452:             * Gets the proposalAwardTypeCode attribute.
453:             * 
454:             * @return Returns the proposalAwardTypeCode
455:             */
456:            public String getProposalAwardTypeCode() {
457:                return proposalAwardTypeCode;
458:            }
459:
460:            /**
461:             * Sets the proposalAwardTypeCode attribute.
462:             * 
463:             * @param proposalAwardTypeCode The proposalAwardTypeCode to set.
464:             */
465:            public void setProposalAwardTypeCode(String proposalAwardTypeCode) {
466:                this .proposalAwardTypeCode = proposalAwardTypeCode;
467:            }
468:
469:            /**
470:             * Gets the agencyNumber attribute.
471:             * 
472:             * @return Returns the agencyNumber
473:             */
474:            public String getAgencyNumber() {
475:                return agencyNumber;
476:            }
477:
478:            /**
479:             * Sets the agencyNumber attribute.
480:             * 
481:             * @param agencyNumber The agencyNumber to set.
482:             */
483:            public void setAgencyNumber(String agencyNumber) {
484:                this .agencyNumber = agencyNumber;
485:            }
486:
487:            /**
488:             * Gets the proposalStatusCode attribute.
489:             * 
490:             * @return Returns the proposalStatusCode
491:             */
492:            public String getProposalStatusCode() {
493:                return proposalStatusCode;
494:            }
495:
496:            /**
497:             * Sets the proposalStatusCode attribute.
498:             * 
499:             * @param proposalStatusCode The proposalStatusCode to set.
500:             */
501:            public void setProposalStatusCode(String proposalStatusCode) {
502:                this .proposalStatusCode = proposalStatusCode;
503:            }
504:
505:            /**
506:             * Gets the federalPassThroughAgencyNumber attribute.
507:             * 
508:             * @return Returns the federalPassThroughAgencyNumber
509:             */
510:            public String getFederalPassThroughAgencyNumber() {
511:                return federalPassThroughAgencyNumber;
512:            }
513:
514:            /**
515:             * Sets the federalPassThroughAgencyNumber attribute.
516:             * 
517:             * @param federalPassThroughAgencyNumber The federalPassThroughAgencyNumber to set.
518:             */
519:            public void setFederalPassThroughAgencyNumber(
520:                    String federalPassThroughAgencyNumber) {
521:                this .federalPassThroughAgencyNumber = federalPassThroughAgencyNumber;
522:            }
523:
524:            /**
525:             * Gets the cfdaNumber attribute.
526:             * 
527:             * @return Returns the cfdaNumber
528:             */
529:            public String getCfdaNumber() {
530:                return cfdaNumber;
531:            }
532:
533:            /**
534:             * Sets the cfdaNumber attribute.
535:             * 
536:             * @param cfdaNumber The cfdaNumber to set.
537:             */
538:            public void setCfdaNumber(String cfdaNumber) {
539:                this .cfdaNumber = cfdaNumber;
540:            }
541:
542:            /**
543:             * Gets the proposalFellowName attribute.
544:             * 
545:             * @return Returns the proposalFellowName
546:             */
547:            public String getProposalFellowName() {
548:                return proposalFellowName;
549:            }
550:
551:            /**
552:             * Sets the proposalFellowName attribute.
553:             * 
554:             * @param proposalFellowName The proposalFellowName to set.
555:             */
556:            public void setProposalFellowName(String proposalFellowName) {
557:                this .proposalFellowName = proposalFellowName;
558:            }
559:
560:            /**
561:             * Gets the proposalPurposeCode attribute.
562:             * 
563:             * @return Returns the proposalPurposeCode
564:             */
565:            public String getProposalPurposeCode() {
566:                return proposalPurposeCode;
567:            }
568:
569:            /**
570:             * Sets the proposalPurposeCode attribute.
571:             * 
572:             * @param proposalPurposeCode The proposalPurposeCode to set.
573:             */
574:            public void setProposalPurposeCode(String proposalPurposeCode) {
575:                this .proposalPurposeCode = proposalPurposeCode;
576:            }
577:
578:            /**
579:             * Gets the proposalProjectTitle attribute.
580:             * 
581:             * @return Returns the proposalProjectTitle
582:             */
583:            public String getProposalProjectTitle() {
584:                return proposalProjectTitle;
585:            }
586:
587:            /**
588:             * Sets the proposalProjectTitle attribute.
589:             * 
590:             * @param proposalProjectTitle The proposalProjectTitle to set.
591:             */
592:            public void setProposalProjectTitle(String proposalProjectTitle) {
593:                this .proposalProjectTitle = proposalProjectTitle;
594:            }
595:
596:            /**
597:             * Gets the active attribute.
598:             * 
599:             * @return Returns the active.
600:             */
601:            public boolean isActive() {
602:                return active;
603:            }
604:
605:            /**
606:             * Sets the active attribute value.
607:             * 
608:             * @param active The active to set.
609:             */
610:            public void setActive(boolean active) {
611:                this .active = active;
612:            }
613:
614:            /**
615:             * Gets the {@link ProposalAwardType} attribute.
616:             * 
617:             * @return Returns the {@link ProposalAwardType}
618:             */
619:            public ProposalAwardType getProposalAwardType() {
620:                return proposalAwardType;
621:            }
622:
623:            /**
624:             * Sets the {@link ProposalAwardType} attribute.
625:             * 
626:             * @param proposalAwardType The {@link ProposalAwardType} to set.
627:             * @deprecated
628:             */
629:            public void setProposalAwardType(ProposalAwardType proposalAwardType) {
630:                this .proposalAwardType = proposalAwardType;
631:            }
632:
633:            /**
634:             * Gets the {@link Agency} attribute.
635:             * 
636:             * @return Returns the {@link Agency}
637:             */
638:            public Agency getAgency() {
639:                return agency;
640:            }
641:
642:            /**
643:             * Sets the {@link Agency} attribute.
644:             * 
645:             * @param agency The {@link Agency} to set.
646:             * @deprecated
647:             */
648:            public void setAgency(Agency agency) {
649:                this .agency = agency;
650:            }
651:
652:            /**
653:             * Gets the {@link ProposalStatus} attribute.
654:             * 
655:             * @return Returns the {@link ProposalStatus}
656:             */
657:            public ProposalStatus getProposalStatus() {
658:                return proposalStatus;
659:            }
660:
661:            /**
662:             * Sets the {@link ProposalStatus} attribute.
663:             * 
664:             * @param proposalStatus The {@link ProposalStatus} to set.
665:             * @deprecated
666:             */
667:            public void setProposalStatus(ProposalStatus proposalStatus) {
668:                this .proposalStatus = proposalStatus;
669:            }
670:
671:            /**
672:             * Gets the federalPassThroughAgency attribute.
673:             * 
674:             * @return Returns the federalPassThroughAgency
675:             */
676:            public Agency getFederalPassThroughAgency() {
677:                return federalPassThroughAgency;
678:            }
679:
680:            /**
681:             * Sets the federalPassThrough {@link Agency} attribute.
682:             * 
683:             * @param federalPassThroughAgency The federalPassThrough {@link Agency} to set.
684:             * @deprecated
685:             */
686:            public void setFederalPassThroughAgency(
687:                    Agency federalPassThroughAgency) {
688:                this .federalPassThroughAgency = federalPassThroughAgency;
689:            }
690:
691:            /**
692:             * Gets the {@link ProposalPurpose} attribute.
693:             * 
694:             * @return Returns the proposalPurpose
695:             */
696:            public ProposalPurpose getProposalPurpose() {
697:                return proposalPurpose;
698:            }
699:
700:            /**
701:             * Sets the {@link ProposalPurpose} attribute.
702:             * 
703:             * @param proposalPurpose The {@link ProposalPurpose} to set.
704:             * @deprecated
705:             */
706:            public void setProposalPurpose(ProposalPurpose proposalPurpose) {
707:                this .proposalPurpose = proposalPurpose;
708:            }
709:
710:            /**
711:             * Gets the {@link Cfda} attribute.
712:             * 
713:             * @return Returns the {@link Cfda}
714:             */
715:            public Cfda getCfda() {
716:                return cfda;
717:            }
718:
719:            /**
720:             * Sets the {@link Cfda} attribute.
721:             * 
722:             * @param cfda The {@link Cfda} to set.
723:             * @deprecated
724:             */
725:            public void setCfda(Cfda cfda) {
726:                this .cfda = cfda;
727:            }
728:
729:            /**
730:             * Gets the {@link List} of {@link ProposalSubcontractor}s associated with a {@link Proposal} instance.
731:             * 
732:             * @return Returns the proposalSubcontractors list
733:             */
734:            public List<ProposalSubcontractor> getProposalSubcontractors() {
735:                return proposalSubcontractors;
736:            }
737:
738:            /**
739:             * Sets the {@link ProposalSubcontractor}s {@link List}.
740:             * 
741:             * @param proposalSubcontractors The {@link ProposalSubcontractor}s {@link List} to set.
742:             */
743:            public void setProposalSubcontractors(
744:                    List<ProposalSubcontractor> proposalSubcontractors) {
745:                this .proposalSubcontractors = proposalSubcontractors;
746:            }
747:
748:            /**
749:             * Gets the {@link List} of {@link ProposalOrganization}s associated with a {@link Proposal} instance.
750:             * 
751:             * @return Returns the {@link ProposalOrganization}s.
752:             */
753:            public List<ProposalOrganization> getProposalOrganizations() {
754:                return proposalOrganizations;
755:            }
756:
757:            /**
758:             * @param proposalOrganizations The proposalOrganizations to set.
759:             */
760:            public void setProposalOrganizations(
761:                    List<ProposalOrganization> proposalOrganizations) {
762:                this .proposalOrganizations = proposalOrganizations;
763:            }
764:
765:            /**
766:             * @return Returns the proposalProjectDirectors.
767:             */
768:            public List<ProposalProjectDirector> getProposalProjectDirectors() {
769:                return proposalProjectDirectors;
770:            }
771:
772:            /**
773:             * @param proposalProjectDirectors The proposalProjectDirectors to set.
774:             */
775:            public void setProposalProjectDirectors(
776:                    List<ProposalProjectDirector> proposalProjectDirectors) {
777:                this .proposalProjectDirectors = proposalProjectDirectors;
778:            }
779:
780:            /**
781:             * @return Returns the proposalResearchRisks.
782:             */
783:            public List<ProposalResearchRisk> getProposalResearchRisks() {
784:                return proposalResearchRisks;
785:            }
786:
787:            /**
788:             * @param proposalResearchRisks The proposalResearchRisks to set.
789:             */
790:            public void setProposalResearchRisks(
791:                    List<ProposalResearchRisk> proposalResearchRisks) {
792:                this .proposalResearchRisks = proposalResearchRisks;
793:            }
794:
795:            /**
796:             * @see org.kuali.core.bo.BusinessObjectBase#toStringMapper()
797:             */
798:            protected LinkedHashMap toStringMapper() {
799:                LinkedHashMap<String, String> m = new LinkedHashMap<String, String>();
800:                if (this .proposalNumber != null) {
801:                    m.put("proposalNumber", this .proposalNumber.toString());
802:                }
803:                return m;
804:            }
805:
806:            /** Dummy value used to facilitate lookups */
807:            private transient String lookupPersonUniversalIdentifier;
808:            private transient UniversalUser lookupUniversalUser;
809:
810:            /**
811:             * Gets the lookup {@link UniversalUser}.
812:             * 
813:             * @return the lookup {@link UniversalUser}
814:             */
815:            public UniversalUser getLookupUniversalUser() {
816:                return lookupUniversalUser;
817:            }
818:
819:            /**
820:             * Sets the lookup {@link UniversalUser}
821:             * 
822:             * @param lookupUniversalUser
823:             */
824:            public void setLookupUniversalUser(UniversalUser lookupUniversalUser) {
825:                this .lookupUniversalUser = lookupUniversalUser;
826:            }
827:
828:            /**
829:             * Gets the universal user id of the lookup person.
830:             * 
831:             * @return the id of the lookup person
832:             */
833:            public String getLookupPersonUniversalIdentifier() {
834:                lookupUniversalUser = SpringContext.getBean(
835:                        UniversalUserService.class)
836:                        .updateUniversalUserIfNecessary(
837:                                lookupPersonUniversalIdentifier,
838:                                lookupUniversalUser);
839:                return lookupPersonUniversalIdentifier;
840:            }
841:
842:            /**
843:             * Sets the universal user id of the lookup person
844:             * 
845:             * @param lookupUniversalUserId the id of the lookup person
846:             */
847:            public void setLookupPersonUniversalIdentifier(
848:                    String lookupUniversalUserId) {
849:                this .lookupPersonUniversalIdentifier = lookupUniversalUserId;
850:            }
851:
852:            /**
853:             * 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
854:             * breaks all lookups on the proposal maintenance doc without this getter.
855:             * 
856:             * @return the {@link LookupService} used by the instance.
857:             */
858:            public LookupService getLookupService() {
859:                return lookupService;
860:            }
861:
862:            /**
863:             * Gets the id of the routing {@link Chart}
864:             * 
865:             * @return the id of the routing {@link Chart}
866:             */
867:            public String getRoutingChart() {
868:                return routingChart;
869:            }
870:
871:            /**
872:             * Sets the id of the routing {@link Chart}.
873:             * 
874:             * @return the id of the routing {@link Chart}.
875:             */
876:            public void setRoutingChart(String routingChart) {
877:                this .routingChart = routingChart;
878:            }
879:
880:            /**
881:             * Gets the id of the routing {@link Org}.
882:             * 
883:             * @return the id of the routing {@link Org}
884:             */
885:            public String getRoutingOrg() {
886:                return routingOrg;
887:            }
888:
889:            /**
890:             * Sets the id of the routing {@link Org}.
891:             * 
892:             * @param the id of the routing {@link Org}
893:             */
894:            public void setRoutingOrg(String routingOrg) {
895:                this .routingOrg = routingOrg;
896:            }
897:
898:            /**
899:             * Gets the primary {@link ProposalOrganization} for a proposal.
900:             * 
901:             * @return the primary {@link ProposalOrganization} for a proposal
902:             */
903:            public ProposalOrganization getPrimaryProposalOrganization() {
904:                for (ProposalOrganization po : proposalOrganizations) {
905:                    if (po != null
906:                            && po.isProposalPrimaryOrganizationIndicator()) {
907:                        setPrimaryProposalOrganization(po);
908:                        break;
909:                    }
910:                }
911:
912:                return primaryProposalOrganization;
913:            }
914:
915:            /**
916:             * Sets the {@link LookupService}. For Spring compatibility.
917:             * 
918:             * @param lookupService
919:             */
920:            public void setLookupService(LookupService lookupService) {
921:                this .lookupService = lookupService;
922:            }
923:
924:            /**
925:             * Sets the primary {@link ProposalOrganization} for a proposal
926:             * 
927:             * @param primaryProposalOrganization
928:             */
929:            public void setPrimaryProposalOrganization(
930:                    ProposalOrganization primaryProposalOrganization) {
931:                this.primaryProposalOrganization = primaryProposalOrganization;
932:                this.routingChart = primaryProposalOrganization
933:                        .getChartOfAccountsCode();
934:                this.routingOrg = primaryProposalOrganization
935:                        .getOrganizationCode();
936:            }
937:
938:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.