Source Code Cross Referenced for Budget.java in  » ERP-CRM-Financial » Kuali-Financial-System » org » kuali » module » kra » budget » 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.kra.budget.bo 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         * Copyright 2006-2007 The Kuali Foundation.
0003:         * 
0004:         * Licensed under the Educational Community License, Version 1.0 (the "License");
0005:         * you may not use this file except in compliance with the License.
0006:         * You may obtain a copy of the License at
0007:         * 
0008:         * http://www.opensource.org/licenses/ecl1.php
0009:         * 
0010:         * Unless required by applicable law or agreed to in writing, software
0011:         * distributed under the License is distributed on an "AS IS" BASIS,
0012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013:         * See the License for the specific language governing permissions and
0014:         * limitations under the License.
0015:         */
0016:        package org.kuali.module.kra.budget.bo;
0017:
0018:        import java.sql.Date;
0019:        import java.util.ArrayList;
0020:        import java.util.Calendar;
0021:        import java.util.GregorianCalendar;
0022:        import java.util.Iterator;
0023:        import java.util.LinkedHashMap;
0024:        import java.util.List;
0025:
0026:        import org.kuali.core.bo.PersistableBusinessObjectBase;
0027:        import org.kuali.core.bo.user.UniversalUser;
0028:        import org.kuali.core.util.KualiDecimal;
0029:        import org.kuali.kfs.KFSPropertyConstants;
0030:        import org.kuali.kfs.context.SpringContext;
0031:        import org.kuali.kfs.service.ParameterService;
0032:        import org.kuali.kfs.service.impl.ParameterConstants;
0033:        import org.kuali.module.cg.bo.Agency;
0034:        import org.kuali.module.cg.bo.ProjectDirector;
0035:        import org.kuali.module.kra.KraConstants;
0036:
0037:        /**
0038:         * This class...
0039:         */
0040:        public class Budget extends PersistableBusinessObjectBase {
0041:
0042:            private static final long serialVersionUID = 8113894775967293272L;
0043:            private String documentNumber;
0044:            private Long budgetParentTrackNumber;
0045:            private String budgetName;
0046:            private boolean institutionCostShareIndicator;
0047:            private String budgetProgramAnnouncementNumber;
0048:            private String budgetProjectDirectorUniversalIdentifier;
0049:            private boolean budgetThirdPartyCostShareIndicator;
0050:            private KualiDecimal budgetPersonnelInflationRate;
0051:            private KualiDecimal budgetNonpersonnelInflationRate;
0052:            private String electronicResearchAdministrationGrantNumber;
0053:            private Long routeSheetTrackNumber;
0054:            private String budgetFringeRateDescription;
0055:            private boolean agencyModularIndicator;
0056:            private String budgetAgencyNumber;
0057:            private String federalPassThroughAgencyNumber;
0058:            private String budgetProgramAnnouncementName;
0059:            private String costShareFinChartOfAccountCd;
0060:            private String costShareOrgCd;
0061:            private String budgetTypeCodeText;
0062:
0063:            private boolean agencyToBeNamedIndicator;
0064:            private boolean projectDirectorToBeNamedIndicator;
0065:
0066:            private Agency budgetAgency;
0067:            private Agency federalPassThroughAgency;
0068:            private ProjectDirector projectDirector;
0069:            private UniversalUser universalUser;
0070:            private BudgetModular modularBudget;
0071:            private List tasks;
0072:            private List periods;
0073:            private List fringeRates;
0074:            private List graduateAssistantRates;
0075:            private List nonpersonnelItems;
0076:            private List personnel;
0077:            private List institutionCostShareItems;
0078:            private List thirdPartyCostShareItems;
0079:            private List institutionCostSharePersonnelItems;
0080:
0081:            private BudgetIndirectCost indirectCost;
0082:
0083:            private List allUserAppointmentTasks;
0084:            private List allUserAppointmentTaskPeriods;
0085:            private List allInstitutionCostSharePeriods;
0086:            private List allThirdPartyCostSharePeriods;
0087:            private List<BudgetIndirectCostLookup> budgetIndirectCostLookups;
0088:
0089:            public Budget() {
0090:                super ();
0091:
0092:                budgetPersonnelInflationRate = new KualiDecimal(
0093:                        SpringContext
0094:                                .getBean(ParameterService.class)
0095:                                .getParameterValue(
0096:                                        ParameterConstants.RESEARCH_ADMINISTRATION_DOCUMENT.class,
0097:                                        KraConstants.DEFAULT_PERSONNEL_INFLATION_RATE));
0098:                budgetNonpersonnelInflationRate = new KualiDecimal(
0099:                        SpringContext
0100:                                .getBean(ParameterService.class)
0101:                                .getParameterValue(
0102:                                        ParameterConstants.RESEARCH_ADMINISTRATION_DOCUMENT.class,
0103:                                        KraConstants.DEFAULT_NONPERSONNEL_INFLATION_RATE));
0104:
0105:                tasks = new ArrayList();
0106:                periods = new ArrayList();
0107:                fringeRates = new ArrayList();
0108:                graduateAssistantRates = new ArrayList();
0109:                nonpersonnelItems = new ArrayList();
0110:                personnel = new ArrayList();
0111:                institutionCostShareItems = new ArrayList();
0112:                thirdPartyCostShareItems = new ArrayList();
0113:                institutionCostSharePersonnelItems = new ArrayList();
0114:                budgetIndirectCostLookups = new ArrayList<BudgetIndirectCostLookup>();
0115:
0116:            }
0117:
0118:            public Budget(String documentNumber) {
0119:                this ();
0120:                this .documentNumber = documentNumber;
0121:            }
0122:
0123:            /**
0124:             * Gets the budgetAgencyNumber attribute.
0125:             * 
0126:             * @return Returns the budgetAgencyNumber.
0127:             */
0128:            public String getBudgetAgencyNumber() {
0129:                return budgetAgencyNumber;
0130:            }
0131:
0132:            /**
0133:             * Sets the budgetAgencyNumber attribute value.
0134:             * 
0135:             * @param budgetAgencyNumber The budgetAgencyNumber to set.
0136:             */
0137:            public void setBudgetAgencyNumber(String budgetAgencyNumber) {
0138:                this .budgetAgencyNumber = budgetAgencyNumber;
0139:            }
0140:
0141:            /**
0142:             * @return Returns the projectDirector.
0143:             */
0144:            public ProjectDirector getProjectDirector() {
0145:                return projectDirector;
0146:            }
0147:
0148:            /**
0149:             * @param projectDirector The projectDirector to set.
0150:             */
0151:            public void setProjectDirector(ProjectDirector projectDirector) {
0152:                this .projectDirector = projectDirector;
0153:            }
0154:
0155:            /**
0156:             * @return Returns the budgetFederalPassThroughIndicator.
0157:             */
0158:            /**
0159:             * @return Returns the budgetFringeRateDescription.
0160:             */
0161:            public String getBudgetFringeRateDescription() {
0162:                return budgetFringeRateDescription;
0163:            }
0164:
0165:            /**
0166:             * @param budgetFringeRateDescription The budgetFringeRateDescription to set.
0167:             */
0168:            public void setBudgetFringeRateDescription(
0169:                    String budgetFringeRateDescription) {
0170:                this .budgetFringeRateDescription = budgetFringeRateDescription;
0171:            }
0172:
0173:            /**
0174:             * @return Returns the budgetName.
0175:             */
0176:            public String getBudgetName() {
0177:                return budgetName;
0178:            }
0179:
0180:            /**
0181:             * @param budgetName The budgetName to set.
0182:             */
0183:            public void setBudgetName(String budgetName) {
0184:                this .budgetName = budgetName;
0185:            }
0186:
0187:            /**
0188:             * @return Returns the budgetParentTrackNumber.
0189:             */
0190:            public Long getBudgetParentTrackNumber() {
0191:                return budgetParentTrackNumber;
0192:            }
0193:
0194:            /**
0195:             * @param budgetParentTrackNumber The budgetParentTrackNumber to set.
0196:             */
0197:            public void setBudgetParentTrackNumber(Long budgetParentTrackNumber) {
0198:                this .budgetParentTrackNumber = budgetParentTrackNumber;
0199:            }
0200:
0201:            /**
0202:             * @return Returns the budgetProgramAnnouncementNumber.
0203:             */
0204:            public String getBudgetProgramAnnouncementNumber() {
0205:                return budgetProgramAnnouncementNumber;
0206:            }
0207:
0208:            /**
0209:             * @param budgetProgramAnnouncementNumber The budgetProgramAnnouncementNumber to set.
0210:             */
0211:            public void setBudgetProgramAnnouncementNumber(
0212:                    String budgetProgramAnnouncementNumber) {
0213:                this .budgetProgramAnnouncementNumber = budgetProgramAnnouncementNumber;
0214:            }
0215:
0216:            /**
0217:             * @return Returns the budgetProjectDirectorUniversalIdentifier.
0218:             */
0219:            public String getBudgetProjectDirectorUniversalIdentifier() {
0220:                return budgetProjectDirectorUniversalIdentifier;
0221:            }
0222:
0223:            /**
0224:             * @param budgetProjectDirectorUniversalIdentifier The budgetProjectDirectorUniversalIdentifier to set.
0225:             */
0226:            public void setBudgetProjectDirectorUniversalIdentifier(
0227:                    String budgetProjectDirectorUniversalIdentifier) {
0228:                this .budgetProjectDirectorUniversalIdentifier = budgetProjectDirectorUniversalIdentifier;
0229:            }
0230:
0231:            /**
0232:             * @return Returns the agencyModularIndicator.
0233:             */
0234:            public boolean isAgencyModularIndicator() {
0235:                return agencyModularIndicator;
0236:            }
0237:
0238:            /**
0239:             * @param agencyModularIndicator The agencyModularIndicator to set.
0240:             */
0241:            public void setAgencyModularIndicator(boolean agencyModularIndicator) {
0242:                this .agencyModularIndicator = agencyModularIndicator;
0243:            }
0244:
0245:            /**
0246:             * @return Returns the budgetNonpersonnelInflationRate.
0247:             */
0248:            public KualiDecimal getBudgetNonpersonnelInflationRate() {
0249:                return budgetNonpersonnelInflationRate;
0250:            }
0251:
0252:            /**
0253:             * @param budgetNonpersonnelInflationRate The budgetNonpersonnelInflationRate to set.
0254:             */
0255:            public void setBudgetNonpersonnelInflationRate(
0256:                    KualiDecimal budgetNonpersonnelInflationRate) {
0257:                this .budgetNonpersonnelInflationRate = budgetNonpersonnelInflationRate;
0258:            }
0259:
0260:            /**
0261:             * @return Returns the budgetPersonnelInflationRate.
0262:             */
0263:            public KualiDecimal getBudgetPersonnelInflationRate() {
0264:                return budgetPersonnelInflationRate;
0265:            }
0266:
0267:            /**
0268:             * @param budgetPersonnelInflationRate The budgetPersonnelInflationRate to set.
0269:             */
0270:            public void setBudgetPersonnelInflationRate(
0271:                    KualiDecimal budgetPersonnelInflationRate) {
0272:                this .budgetPersonnelInflationRate = budgetPersonnelInflationRate;
0273:            }
0274:
0275:            /**
0276:             * @return Returns the budgetThirdPartyCostShareIndicator.
0277:             */
0278:            public boolean isBudgetThirdPartyCostShareIndicator() {
0279:                return budgetThirdPartyCostShareIndicator;
0280:            }
0281:
0282:            /**
0283:             * @param budgetThirdPartyCostShareIndicator The budgetThirdPartyCostShareIndicator to set.
0284:             */
0285:            public void setBudgetThirdPartyCostShareIndicator(
0286:                    boolean budgetThirdPartyCostShareIndicator) {
0287:                this .budgetThirdPartyCostShareIndicator = budgetThirdPartyCostShareIndicator;
0288:            }
0289:
0290:            /**
0291:             * @return Returns the institutionCostShareIndicator.
0292:             */
0293:            public boolean isInstitutionCostShareIndicator() {
0294:                return institutionCostShareIndicator;
0295:            }
0296:
0297:            /**
0298:             * @param institutionCostShareIndicator The institutionCostShareIndicator to set.
0299:             */
0300:            public void setInstitutionCostShareIndicator(
0301:                    boolean institutionCostShareIndicator) {
0302:                this .institutionCostShareIndicator = institutionCostShareIndicator;
0303:            }
0304:
0305:            /**
0306:             * @return Returns the electronicResearchAdministrationGrantNumber.
0307:             */
0308:            public String getElectronicResearchAdministrationGrantNumber() {
0309:                return electronicResearchAdministrationGrantNumber;
0310:            }
0311:
0312:            /**
0313:             * @param electronicResearchAdministrationGrantNumber The electronicResearchAdministrationGrantNumber to set.
0314:             */
0315:            public void setElectronicResearchAdministrationGrantNumber(
0316:                    String electronicResearchAdministrationGrantNumber) {
0317:                this .electronicResearchAdministrationGrantNumber = electronicResearchAdministrationGrantNumber;
0318:            }
0319:
0320:            /**
0321:             * @return Returns the periods.
0322:             */
0323:            public List<BudgetPeriod> getPeriods() {
0324:                return periods;
0325:            }
0326:
0327:            /**
0328:             * @param periods The periods to set.
0329:             */
0330:            public void setPeriods(List periods) {
0331:                this .periods = periods;
0332:            }
0333:
0334:            /**
0335:             * Retrieve a particular task at a given index in the list of tasks.
0336:             * 
0337:             * @param index
0338:             * @return
0339:             */
0340:            public BudgetPeriod getPeriod(int index) {
0341:                while (getPeriods().size() <= index) {
0342:                    getPeriods().add(new BudgetPeriod());
0343:                }
0344:                return (BudgetPeriod) getPeriods().get(index);
0345:            }
0346:
0347:            /**
0348:             * @return Returns the routeSheetTrackNumber.
0349:             */
0350:            public Long getRouteSheetTrackNumber() {
0351:                return routeSheetTrackNumber;
0352:            }
0353:
0354:            /**
0355:             * @param routeSheetTrackNumber The routeSheetTrackNumber to set.
0356:             */
0357:            public void setRouteSheetTrackNumber(Long routeSheetTrackNumber) {
0358:                this .routeSheetTrackNumber = routeSheetTrackNumber;
0359:            }
0360:
0361:            /**
0362:             * @return Returns the tasks.
0363:             */
0364:            public List<BudgetTask> getTasks() {
0365:                return tasks;
0366:            }
0367:
0368:            /**
0369:             * @param tasks The tasks to set.
0370:             */
0371:            public void setTasks(List tasks) {
0372:                this .tasks = tasks;
0373:            }
0374:
0375:            /**
0376:             * Retrieve a particular task at a given index in the list of tasks.
0377:             * 
0378:             * @param index
0379:             * @return
0380:             */
0381:            public BudgetTask getTask(int index) {
0382:                while (getTasks().size() <= index) {
0383:                    getTasks().add(new BudgetTask());
0384:                }
0385:                return (BudgetTask) getTasks().get(index);
0386:            }
0387:
0388:            /**
0389:             * @return Returns the budgetAgency.
0390:             */
0391:            public Agency getBudgetAgency() {
0392:                return budgetAgency;
0393:            }
0394:
0395:            /**
0396:             * @param budgetAgency The budgetAgency to set.
0397:             */
0398:            public void setBudgetAgency(Agency budgetAgency) {
0399:                this .budgetAgency = budgetAgency;
0400:            }
0401:
0402:            /*
0403:             * (non-Javadoc)
0404:             * 
0405:             * @see org.kuali.core.bo.BusinessObjectBase#toStringMapper()
0406:             */
0407:            protected LinkedHashMap toStringMapper() {
0408:                // TODO Auto-generated method stub
0409:                LinkedHashMap map = new LinkedHashMap();
0410:                map.put(KFSPropertyConstants.DOCUMENT_NUMBER,
0411:                        this .documentNumber);
0412:                return map;
0413:            }
0414:
0415:            /*
0416:             * (non-Javadoc)
0417:             * 
0418:             * @see org.kuali.bo.Document#populateDocumentForRouting()
0419:             */
0420:            public void populateDocumentForRouting() {
0421:                // TODO Auto-generated method stub
0422:
0423:            }
0424:
0425:            /*
0426:             * (non-Javadoc)
0427:             * 
0428:             * @see org.kuali.bo.Document#getDocumentTitle()
0429:             */
0430:            public String getDocumentTitle() {
0431:                // TODO Auto-generated method stub
0432:                return null;
0433:            }
0434:
0435:            /**
0436:             * @return Returns the documentNumber.
0437:             */
0438:            public String getDocumentNumber() {
0439:                return documentNumber;
0440:            }
0441:
0442:            /**
0443:             * @param documentNumber The documentNumber to set.
0444:             */
0445:            public void setDocumentNumber(String documentNumber) {
0446:                this .documentNumber = documentNumber;
0447:            }
0448:
0449:            /**
0450:             * @return Returns the fringeRates.
0451:             */
0452:            public List<BudgetFringeRate> getFringeRates() {
0453:                return fringeRates;
0454:            }
0455:
0456:            /**
0457:             * @param fringeRates The fringeRates to set.
0458:             */
0459:            public void setFringeRates(List fringeRates) {
0460:                this .fringeRates = fringeRates;
0461:            }
0462:
0463:            /**
0464:             * Retrieve a particular fringe rate at a given index in the list of rates.
0465:             * 
0466:             * @param index
0467:             * @return
0468:             */
0469:            public BudgetFringeRate getFringeRate(int index) {
0470:                while (getFringeRates().size() <= index) {
0471:                    getFringeRates().add(new BudgetFringeRate());
0472:                }
0473:                return (BudgetFringeRate) getFringeRates().get(index);
0474:            }
0475:
0476:            /**
0477:             * @return Returns the graduate assistant rates
0478:             */
0479:            public List<BudgetGraduateAssistantRate> getGraduateAssistantRates() {
0480:                return graduateAssistantRates;
0481:            }
0482:
0483:            /**
0484:             * @param graduateAssistantRates The graduate assistant rates to set
0485:             */
0486:            public void setGraduateAssistantRates(List graduateAssistantRates) {
0487:                this .graduateAssistantRates = graduateAssistantRates;
0488:            }
0489:
0490:            /**
0491:             * Retreive a particular graduate assistant rate at a given index in the list of rates.
0492:             * 
0493:             * @param index
0494:             * @return
0495:             */
0496:            public BudgetGraduateAssistantRate getGraduateAssistantRate(
0497:                    int index) {
0498:                while (getGraduateAssistantRates().size() <= index) {
0499:                    getGraduateAssistantRates().add(
0500:                            new BudgetGraduateAssistantRate());
0501:                }
0502:                return (BudgetGraduateAssistantRate) getGraduateAssistantRates()
0503:                        .get(index);
0504:            }
0505:
0506:            /**
0507:             * Gets the nonpersonnelItems attribute.
0508:             * 
0509:             * @return Returns the nonpersonnelItems.
0510:             */
0511:            public List<BudgetNonpersonnel> getNonpersonnelItems() {
0512:                return nonpersonnelItems;
0513:            }
0514:
0515:            /**
0516:             * Sets the nonpersonnelItems attribute value.
0517:             * 
0518:             * @param nonpersonnelItems The nonpersonnelItems to set.
0519:             */
0520:            public void setNonpersonnelItems(List nonpersonnelItems) {
0521:                this .nonpersonnelItems = nonpersonnelItems;
0522:            }
0523:
0524:            /**
0525:             * Retreive a particular nonpersonnelitem at the given index in the list of personnel.
0526:             * 
0527:             * @param index
0528:             * @return
0529:             */
0530:            public BudgetNonpersonnel getNonpersonnelItem(int index) {
0531:                while (getNonpersonnelItems().size() <= index) {
0532:                    getNonpersonnelItems().add(new BudgetNonpersonnel());
0533:                }
0534:                return (BudgetNonpersonnel) getNonpersonnelItems().get(index);
0535:            }
0536:
0537:            /**
0538:             * Gets the federalPassThroughAgency attribute.
0539:             * 
0540:             * @return Returns the federalPassThroughAgency.
0541:             */
0542:            public Agency getFederalPassThroughAgency() {
0543:                return federalPassThroughAgency;
0544:            }
0545:
0546:            /**
0547:             * Sets the federalPassThroughAgency attribute value.
0548:             * 
0549:             * @param federalPassThroughAgency The federalPassThroughAgency to set.
0550:             */
0551:            public void setFederalPassThroughAgency(
0552:                    Agency federalPassThroughAgency) {
0553:                this .federalPassThroughAgency = federalPassThroughAgency;
0554:            }
0555:
0556:            /**
0557:             * Gets the federalPassThroughAgencyNumber attribute.
0558:             * 
0559:             * @return Returns the federalPassThroughAgencyNumber.
0560:             */
0561:            public String getFederalPassThroughAgencyNumber() {
0562:                return federalPassThroughAgencyNumber;
0563:            }
0564:
0565:            /**
0566:             * Sets the federalPassThroughAgencyNumber attribute value.
0567:             * 
0568:             * @param federalPassThroughAgencyNumber The federalPassThroughAgencyNumber to set.
0569:             */
0570:            public void setFederalPassThroughAgencyNumber(
0571:                    String federalPassThroughAgencyNumber) {
0572:                this .federalPassThroughAgencyNumber = federalPassThroughAgencyNumber;
0573:            }
0574:
0575:            /**
0576:             * Gets the personnel attribute.
0577:             * 
0578:             * @return Returns the personnel.
0579:             */
0580:            public List<BudgetUser> getPersonnel() {
0581:                return personnel;
0582:            }
0583:
0584:            /**
0585:             * Sets the personnel attribute value.
0586:             * 
0587:             * @param personnel The personnel to set.
0588:             */
0589:            public void setPersonnel(List personnel) {
0590:                this .personnel = personnel;
0591:            }
0592:
0593:            /**
0594:             * Retreive a particular person at the given index in the list of personnel.
0595:             * 
0596:             * @param index
0597:             * @return
0598:             */
0599:            public BudgetUser getPersonFromList(int index) {
0600:                while (getPersonnel().size() <= index) {
0601:                    getPersonnel().add(new BudgetUser());
0602:                }
0603:                return (BudgetUser) getPersonnel().get(index);
0604:            }
0605:
0606:            /**
0607:             * Gets the modularBudget attribute.
0608:             * 
0609:             * @return Returns the modularBudget.
0610:             */
0611:            public BudgetModular getModularBudget() {
0612:                return modularBudget;
0613:            }
0614:
0615:            /**
0616:             * Sets the modularBudget attribute value.
0617:             * 
0618:             * @param modularBudget The modularBudget to set.
0619:             */
0620:            public void setModularBudget(BudgetModular modularBudget) {
0621:                this .modularBudget = modularBudget;
0622:            }
0623:
0624:            /**
0625:             * Gets the budgetProgramAnnouncementName attribute.
0626:             * 
0627:             * @return Returns the budgetProgramAnnouncementName.
0628:             */
0629:            public String getBudgetProgramAnnouncementName() {
0630:                return budgetProgramAnnouncementName;
0631:            }
0632:
0633:            /**
0634:             * Sets the budgetProgramAnnouncementName attribute value.
0635:             * 
0636:             * @param budgetProgramAnnouncementName The budgetProgramAnnouncementName to set.
0637:             */
0638:            public void setBudgetProgramAnnouncementName(
0639:                    String budgetProgramAnnouncementName) {
0640:                this .budgetProgramAnnouncementName = budgetProgramAnnouncementName;
0641:            }
0642:
0643:            /**
0644:             * @return Returns the costShareFinChartOfAccountCd.
0645:             */
0646:            public String getCostShareFinChartOfAccountCd() {
0647:                return costShareFinChartOfAccountCd;
0648:            }
0649:
0650:            /**
0651:             * @param costShareFinChartOfAccountCd The costShareFinChartOfAccountCd to set.
0652:             */
0653:            public void setCostShareFinChartOfAccountCd(
0654:                    String costShareFinChartOfAccountCd) {
0655:                this .costShareFinChartOfAccountCd = costShareFinChartOfAccountCd;
0656:            }
0657:
0658:            /**
0659:             * @return Returns the costShareOrgCd.
0660:             */
0661:            public String getCostShareOrgCd() {
0662:                return costShareOrgCd;
0663:            }
0664:
0665:            /**
0666:             * @param costShareOrgCd The costShareOrgCd to set.
0667:             */
0668:            public void setCostShareOrgCd(String costShareOrgCd) {
0669:                this .costShareOrgCd = costShareOrgCd;
0670:            }
0671:
0672:            /**
0673:             * @return Returns the budgetTypeCodeText.
0674:             */
0675:            public String getBudgetTypeCodeText() {
0676:                return budgetTypeCodeText;
0677:            }
0678:
0679:            /**
0680:             * @param budgetTypeCodeText The budgetTypeCodeText to set.
0681:             */
0682:            public void setBudgetTypeCodeText(String budgetTypeCodeText) {
0683:                this .budgetTypeCodeText = budgetTypeCodeText;
0684:            }
0685:
0686:            /**
0687:             * Getters & setters for BudgetTypeCodes in array form - for checkboxes
0688:             * 
0689:             * @return String[]
0690:             */
0691:            public String[] getBudgetTypeCodeArray() {
0692:                String[] array = this .getBudgetTypeCodeText().split("-");
0693:                return array;
0694:            }
0695:
0696:            public void addBudgetTypeCode(String budgetTypeCode) {
0697:                this .setBudgetTypeCodeText(this .getBudgetTypeCodeText() + "-"
0698:                        + budgetTypeCode);
0699:            }
0700:
0701:            public void setBudgetTypeCodeArray(String[] budgetTypeCodeArray) {
0702:                StringBuffer sb = new StringBuffer();
0703:                for (int i = 0; i < budgetTypeCodeArray.length; i++) {
0704:                    if (i != 0) {
0705:                        sb.append("-");
0706:                    }
0707:                    sb.append(budgetTypeCodeArray[i]);
0708:                }
0709:                this .setBudgetTypeCodeText(sb.toString());
0710:            }
0711:
0712:            /**
0713:             * @return Returns the institutionCostShareItems.
0714:             */
0715:            public List<BudgetInstitutionCostShare> getInstitutionCostShareItems() {
0716:                return institutionCostShareItems;
0717:            }
0718:
0719:            public BudgetInstitutionCostShare getInstitutionCostShareItem(
0720:                    int index) {
0721:                while (getInstitutionCostShareItems().size() <= index) {
0722:                    getInstitutionCostShareItems().add(
0723:                            new BudgetInstitutionCostShare());
0724:                }
0725:                return (BudgetInstitutionCostShare) getInstitutionCostShareItems()
0726:                        .get(index);
0727:            }
0728:
0729:            /**
0730:             * @param institutionCostShareItems The institutionCostShareItems to set.
0731:             */
0732:            public void setInstitutionCostShareItems(
0733:                    List institutionCostShareItems) {
0734:                this .institutionCostShareItems = institutionCostShareItems;
0735:            }
0736:
0737:            /**
0738:             * @return Returns the agencyToBeNamedIndicator.
0739:             */
0740:            public boolean isAgencyToBeNamedIndicator() {
0741:                return agencyToBeNamedIndicator;
0742:            }
0743:
0744:            /**
0745:             * @param agencyToBeNamedIndicator The agencyToBeNamedIndicator to set.
0746:             */
0747:            public void setAgencyToBeNamedIndicator(
0748:                    boolean agencyToBeNamedIndicator) {
0749:                this .agencyToBeNamedIndicator = agencyToBeNamedIndicator;
0750:            }
0751:
0752:            /**
0753:             * @return Returns the projectDirectorToBeNamedIndicator.
0754:             */
0755:            public boolean isProjectDirectorToBeNamedIndicator() {
0756:                return projectDirectorToBeNamedIndicator;
0757:            }
0758:
0759:            /**
0760:             * @param projectDirectorToBeNamedIndicator The projectDirectorToBeNamedIndicator to set.
0761:             */
0762:            public void setProjectDirectorToBeNamedIndicator(
0763:                    boolean projectDirectorToBeNamedIndicator) {
0764:                this .projectDirectorToBeNamedIndicator = projectDirectorToBeNamedIndicator;
0765:            }
0766:
0767:            /**
0768:             * @return budgetIndirectCost;
0769:             */
0770:            public BudgetIndirectCost getIndirectCost() {
0771:                return indirectCost;
0772:            }
0773:
0774:            /**
0775:             * @param budgetIndirectCost
0776:             */
0777:            public void setIndirectCost(BudgetIndirectCost indirectCost) {
0778:                this .indirectCost = indirectCost;
0779:            }
0780:
0781:            public void setAllUserAppointmentTasks(List list) {
0782:                this .allUserAppointmentTasks = list;
0783:            }
0784:
0785:            public List getAllUserAppointmentTasks() {
0786:                return getAllUserAppointmentTaskPeriods(false);
0787:            }
0788:
0789:            public List getAllUserAppointmentTasks(
0790:                    boolean forceRefreshPriorToSave) {
0791:                if (allUserAppointmentTasks == null) {
0792:                    List list = new ArrayList();
0793:                    for (Iterator i = personnel.iterator(); i.hasNext();) {
0794:                        BudgetUser budgetUser = (BudgetUser) i.next();
0795:                        if (forceRefreshPriorToSave) {
0796:                            budgetUser = new BudgetUser(budgetUser);
0797:                            budgetUser
0798:                                    .refreshReferenceObject("userAppointmentTasks");
0799:                        }
0800:                        list.addAll(budgetUser.getUserAppointmentTasks());
0801:                    }
0802:                    return list;
0803:                } else {
0804:                    return allUserAppointmentTasks;
0805:                }
0806:            }
0807:
0808:            public void setAllUserAppointmentTaskPeriods(List list) {
0809:                this .allUserAppointmentTaskPeriods = list;
0810:            }
0811:
0812:            public List getAllUserAppointmentTaskPeriods() {
0813:                return getAllUserAppointmentTaskPeriods(false);
0814:            }
0815:
0816:            public List<UserAppointmentTaskPeriod> getAllUserAppointmentTaskPeriods(
0817:                    boolean forceRefreshPriorToSave) {
0818:                if (allUserAppointmentTaskPeriods == null) {
0819:                    List list = new ArrayList();
0820:                    for (Iterator i = getAllUserAppointmentTasks(
0821:                            forceRefreshPriorToSave).iterator(); i.hasNext();) {
0822:                        UserAppointmentTask userAppointmentTask = (UserAppointmentTask) i
0823:                                .next();
0824:                        if (forceRefreshPriorToSave) {
0825:                            userAppointmentTask = new UserAppointmentTask(
0826:                                    userAppointmentTask);
0827:                            userAppointmentTask
0828:                                    .refreshReferenceObject("userAppointmentTaskPeriods");
0829:                        }
0830:                        list.addAll(userAppointmentTask
0831:                                .getUserAppointmentTaskPeriods());
0832:                    }
0833:                    return list;
0834:                } else {
0835:                    return allUserAppointmentTaskPeriods;
0836:                }
0837:            }
0838:
0839:            /**
0840:             * @return Returns the thirdPartyCostShareItems.
0841:             */
0842:            public List<BudgetThirdPartyCostShare> getThirdPartyCostShareItems() {
0843:                return thirdPartyCostShareItems;
0844:            }
0845:
0846:            public BudgetThirdPartyCostShare getThirdPartyCostShareItem(
0847:                    int index) {
0848:                while (getThirdPartyCostShareItems().size() <= index) {
0849:                    getThirdPartyCostShareItems().add(
0850:                            new BudgetThirdPartyCostShare());
0851:                }
0852:                return (BudgetThirdPartyCostShare) getThirdPartyCostShareItems()
0853:                        .get(index);
0854:            }
0855:
0856:            /**
0857:             * @param thirdPartyCostShareItems The thirdPartyCostShareItems to set.
0858:             */
0859:            public void setThirdPartyCostShareItems(
0860:                    List thirdPartyCostShareItems) {
0861:                this .thirdPartyCostShareItems = thirdPartyCostShareItems;
0862:            }
0863:
0864:            /**
0865:             * @return Returns the allThirdPartyCostSharePeriods.
0866:             */
0867:            public List getAllThirdPartyCostSharePeriods() {
0868:                return allThirdPartyCostSharePeriods;
0869:            }
0870:
0871:            /**
0872:             * @param allThirdPartyCostSharePeriods The allThirdPartyCostSharePeriods to set.
0873:             */
0874:            public void setAllThirdPartyCostSharePeriods(
0875:                    List allThirdPartyCostSharePeriods) {
0876:                this .allThirdPartyCostSharePeriods = allThirdPartyCostSharePeriods;
0877:            }
0878:
0879:            public List getAllThirdPartyCostSharePeriods(
0880:                    boolean forceRefreshPriorToSave) {
0881:                if (allThirdPartyCostSharePeriods == null) {
0882:                    List list = new ArrayList();
0883:                    for (Iterator i = thirdPartyCostShareItems.iterator(); i
0884:                            .hasNext();) {
0885:                        BudgetThirdPartyCostShare costShareItem = (BudgetThirdPartyCostShare) i
0886:                                .next();
0887:                        if (forceRefreshPriorToSave) {
0888:                            costShareItem = new BudgetThirdPartyCostShare(
0889:                                    costShareItem);
0890:                            costShareItem
0891:                                    .refreshReferenceObject("budgetPeriodCostShare");
0892:                        }
0893:                        list.addAll(costShareItem.getBudgetPeriodCostShare());
0894:                    }
0895:                    return list;
0896:                } else {
0897:                    return allThirdPartyCostSharePeriods;
0898:                }
0899:            }
0900:
0901:            /**
0902:             * @return Returns the allInstitutionCostSharePeriods.
0903:             */
0904:            public List getAllInstitutionCostSharePeriods() {
0905:                return allInstitutionCostSharePeriods;
0906:            }
0907:
0908:            /**
0909:             * @param allInstitutionCostSharePeriods The allInstitutionCostSharePeriods to set.
0910:             */
0911:            public void setAllInstitutionCostSharePeriods(
0912:                    List allInstitutionCostSharePeriods) {
0913:                this .allInstitutionCostSharePeriods = allInstitutionCostSharePeriods;
0914:            }
0915:
0916:            public List getAllInstitutionCostSharePeriods(
0917:                    boolean forceRefreshPriorToSave) {
0918:                if (allInstitutionCostSharePeriods == null) {
0919:                    List list = new ArrayList();
0920:                    for (Iterator i = institutionCostShareItems.iterator(); i
0921:                            .hasNext();) {
0922:                        BudgetInstitutionCostShare costShareItem = (BudgetInstitutionCostShare) i
0923:                                .next();
0924:                        if (forceRefreshPriorToSave) {
0925:                            costShareItem = new BudgetInstitutionCostShare(
0926:                                    costShareItem);
0927:                            costShareItem
0928:                                    .refreshReferenceObject("budgetPeriodCostShare");
0929:                        }
0930:                        list.addAll(costShareItem.getBudgetPeriodCostShare());
0931:                    }
0932:                    return list;
0933:                } else {
0934:                    return allInstitutionCostSharePeriods;
0935:                }
0936:            }
0937:
0938:            /**
0939:             * @return Returns the institutionCostSharePersonnelItems.
0940:             */
0941:            public List getInstitutionCostSharePersonnelItems() {
0942:                return institutionCostSharePersonnelItems;
0943:            }
0944:
0945:            public InstitutionCostSharePersonnel getInstitutionCostSharePersonnelItem(
0946:                    int index) {
0947:                while (getInstitutionCostSharePersonnelItems().size() <= index) {
0948:                    getInstitutionCostSharePersonnelItems().add(
0949:                            new InstitutionCostSharePersonnel());
0950:                }
0951:                return (InstitutionCostSharePersonnel) getInstitutionCostSharePersonnelItems()
0952:                        .get(index);
0953:            }
0954:
0955:            /**
0956:             * @param institutionCostSharePersonnelItems The institutionCostSharePersonnelItems to set.
0957:             */
0958:            public void setInstitutionCostSharePersonnelItems(
0959:                    List institutionCostSharePersonnelItems) {
0960:                this .institutionCostSharePersonnelItems = institutionCostSharePersonnelItems;
0961:            }
0962:
0963:            public Date getDefaultNextPeriodBeginDate() {
0964:                if (this .getPeriods().size() > 0) {
0965:                    BudgetPeriod lastPeriod = (BudgetPeriod) this .getPeriods()
0966:                            .get(this .getPeriods().size() - 1);
0967:                    if (lastPeriod.getBudgetPeriodEndDate() != null) {
0968:                        Date oldEndDate = lastPeriod.getBudgetPeriodEndDate();
0969:                        Calendar oldEndCal = new GregorianCalendar();
0970:                        oldEndCal.setTime(oldEndDate);
0971:                        oldEndCal.add(Calendar.DATE, 1);
0972:                        return new Date(oldEndCal.getTimeInMillis());
0973:                    }
0974:                }
0975:                return null;
0976:            }
0977:
0978:            public void setBudgetIndirectCostLookups(
0979:                    List<BudgetIndirectCostLookup> budgetIndirectCostLookupList) {
0980:                this .budgetIndirectCostLookups = budgetIndirectCostLookupList;
0981:            }
0982:
0983:            public List<BudgetIndirectCostLookup> getBudgetIndirectCostLookups() {
0984:                return this .budgetIndirectCostLookups;
0985:            }
0986:
0987:            public BudgetIndirectCostLookup getBudgetIndirectCostLookup(
0988:                    int index) {
0989:                while (this .getBudgetIndirectCostLookups().size() <= index) {
0990:                    this .getBudgetIndirectCostLookups().add(
0991:                            new BudgetIndirectCostLookup());
0992:                }
0993:                return this .getBudgetIndirectCostLookups().get(index);
0994:            }
0995:
0996:            public UniversalUser getUniversalUser() {
0997:                return universalUser;
0998:            }
0999:
1000:            public void setUniversalUser(UniversalUser universalUser) {
1001:                this.universalUser = universalUser;
1002:            }
1003:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.