Source Code Cross Referenced for AccountPresenceServiceImpl.java in  » ERP-CRM-Financial » Kuali-Financial-System » org » kuali » module » financial » service » impl » 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.financial.service.impl 
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:        package org.kuali.module.financial.service.impl;
017:
018:        import org.kuali.module.chart.bo.Account;
019:        import org.kuali.module.chart.bo.ObjectCode;
020:        import org.kuali.module.financial.service.AccountPresenceService;
021:        import org.kuali.module.gl.bo.Balance;
022:        import org.kuali.module.gl.dao.BalanceDao;
023:        import org.springframework.transaction.annotation.Transactional;
024:
025:        /**
026:         * 
027:         * This is the default implementation of the AccountPresenceService interface.
028:         * 
029:         */
030:        @Transactional
031:        public class AccountPresenceServiceImpl implements 
032:                AccountPresenceService {
033:            private BalanceDao balanceDao;
034:
035:            /**
036:             * This method determines if an object code has been budgeted for account presence.  
037:             * 
038:             * @param account The account to be checked for the presence control flag.
039:             * @param objectCode The object code being reviewed.
040:             * @return True if the object code has been budgeted for an account presence, false otherwise.
041:             * 
042:             * @see org.kuali.module.financial.service.AccountPresenceService#isObjectCodeBudgetedForAccountPresence(org.kuali.module.chart.bo.Account, org.kuali.module.chart.bo.ObjectCode)
043:             */
044:            public boolean isObjectCodeBudgetedForAccountPresence(
045:                    Account account, ObjectCode objectCode) {
046:                boolean objectCodeValid = true;
047:
048:                /*
049:                 * first check if account has presence control turned on, if not no checks need to take place on object code budgeting
050:                 */
051:                if (account.isFinancialObjectivePrsctrlIndicator()) {
052:                    /*
053:                     * can have budgeting record for object code, it's consolidation code, or object level
054:                     */
055:
056:                    // try to find budget record for object code
057:                    Balance foundBalance = (Balance) balanceDao
058:                            .getCurrentBudgetForObjectCode(objectCode
059:                                    .getUniversityFiscalYear(), account
060:                                    .getChartOfAccountsCode(), account
061:                                    .getAccountNumber(), objectCode
062:                                    .getFinancialObjectCode());
063:
064:                    // if object code budget not found, try consolidation object code
065:                    if (foundBalance == null) {
066:                        foundBalance = (Balance) balanceDao
067:                                .getCurrentBudgetForObjectCode(objectCode
068:                                        .getUniversityFiscalYear(), account
069:                                        .getChartOfAccountsCode(), account
070:                                        .getAccountNumber(), objectCode
071:                                        .getFinancialObjectLevel()
072:                                        .getConsolidatedObjectCode());
073:
074:                        // if consolidation object code budget not found, try object level
075:                        if (foundBalance == null) {
076:                            foundBalance = (Balance) balanceDao
077:                                    .getCurrentBudgetForObjectCode(objectCode
078:                                            .getUniversityFiscalYear(), account
079:                                            .getChartOfAccountsCode(), account
080:                                            .getAccountNumber(), objectCode
081:                                            .getFinancialObjectLevelCode());
082:
083:                            // object not budgeted
084:                            if (foundBalance == null) {
085:                                objectCodeValid = false;
086:                            }
087:                        }
088:                    }
089:                }
090:
091:                return objectCodeValid;
092:            }
093:
094:            /**
095:             * Simple getter used to retrieve an instance of the BalanceDao.
096:             * 
097:             * @return Returns the balanceDao.
098:             */
099:            public BalanceDao getBalanceDao() {
100:                return balanceDao;
101:            }
102:
103:            /**
104:             * Simple setter used to set the local BalanceDao attribute.
105:             * 
106:             * @param balanceDao The balanceDao to set.
107:             */
108:            public void setBalanceDao(BalanceDao balanceDao) {
109:                this.balanceDao = balanceDao;
110:            }
111:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.