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


001:        /*
002:         * Copyright 2005-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.chart.service.impl;
017:
018:        import java.util.ArrayList;
019:        import java.util.Collection;
020:        import java.util.List;
021:
022:        import org.kuali.core.util.spring.Cached;
023:        import org.kuali.kfs.bo.Options;
024:        import org.kuali.kfs.dao.OptionsDao;
025:        import org.kuali.kfs.service.KualiCodeService;
026:        import org.kuali.module.chart.bo.codes.BalanceTyp;
027:        import org.kuali.module.chart.dao.BalanceTypeDao;
028:        import org.kuali.module.chart.service.BalanceTypService;
029:        import org.kuali.module.financial.service.UniversityDateService;
030:        import org.springframework.transaction.annotation.Transactional;
031:
032:        /**
033:         * This service implementation is the default implementation of the BalanceTyp service that is delivered with Kuali. It uses the
034:         * balance types that are defined in the Kuali database.
035:         */
036:        @Transactional
037:        public class BalanceTypServiceImpl implements  BalanceTypService {
038:            private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger
039:                    .getLogger(BalanceTypServiceImpl.class);
040:
041:            // balance type constants
042:            private static final String ACTUAL_BALANCE_TYPE = "AC";
043:
044:            private KualiCodeService kualiCodeService;
045:            private BalanceTypeDao balanceTypeDao;
046:
047:            private UniversityDateService universityDateService;
048:            private OptionsDao optionsDao;
049:
050:            /**
051:             * @see org.kuali.module.chart.service.BalanceTypService#getActualBalanceTyp()
052:             */
053:            public BalanceTyp getActualBalanceTyp() {
054:                return getBalanceTypByCode(ACTUAL_BALANCE_TYPE);
055:            }
056:
057:            /**
058:             * @see org.kuali.module.chart.service.BalanceTypService#getEncumbranceBalanceTypes()
059:             */
060:            public Collection getEncumbranceBalanceTypes() {
061:                LOG.debug("getEncumbranceBalanceTypes() started");
062:
063:                return balanceTypeDao.getEncumbranceBalanceTypes();
064:            }
065:
066:            /**
067:             * This method retrieves a BalanceTyp instance from the Kuali database by its primary key - the balance typ's code.
068:             * 
069:             * @param code The primary key in the database for this data type.
070:             * @return A fully populated object instance.
071:             */
072:            @Cached
073:            public BalanceTyp getBalanceTypByCode(String code) {
074:                return (BalanceTyp) kualiCodeService.getByCode(
075:                        BalanceTyp.class, code);
076:            }
077:
078:            /**
079:             * @see org.kuali.module.chart.service.BalanceTypService#getAllBalanceTyps()
080:             */
081:            @Cached
082:            public Collection getAllBalanceTyps() {
083:                return kualiCodeService.getAll(BalanceTyp.class);
084:            }
085:
086:            /**
087:             * 
088:             * This method injects the KualiCodeService
089:             * @param kualiCodeService
090:             */
091:            public void setKualiCodeService(KualiCodeService kualiCodeService) {
092:                this .kualiCodeService = kualiCodeService;
093:            }
094:
095:            /**
096:             * 
097:             * This method injects the BalanceTypeDao
098:             * @param balanceTypeDao
099:             */
100:            public void setBalanceTypeDao(BalanceTypeDao balanceTypeDao) {
101:                this .balanceTypeDao = balanceTypeDao;
102:            }
103:
104:            /**
105:             * 
106:             * This method injects the UniversityDateService
107:             * @param universityDateService
108:             */
109:            public void setUniversityDateService(
110:                    UniversityDateService universityDateService) {
111:                this .universityDateService = universityDateService;
112:            }
113:
114:            /**
115:             * 
116:             * This method injects the OptionsDao
117:             * @param optionsDao
118:             */
119:            public void setOptionsDao(OptionsDao optionsDao) {
120:                this .optionsDao = optionsDao;
121:            }
122:
123:            /**
124:             * @see org.kuali.module.chart.service.BalanceTypService#getCostShareEncumbranceBalanceType(java.lang.Integer)
125:             */
126:            public String getCostShareEncumbranceBalanceType(
127:                    Integer universityFiscalYear) {
128:                return optionsDao.getByPrimaryId(universityFiscalYear)
129:                        .getCostShareEncumbranceBalanceTypeCd();
130:            }
131:
132:            /**
133:             * 
134:             * @see org.kuali.module.chart.service.BalanceTypService#getEncumbranceBalanceTypes(java.lang.Integer)
135:             */
136:            public List<String> getEncumbranceBalanceTypes(
137:                    Integer universityFiscalYear) {
138:                Options option = optionsDao
139:                        .getByPrimaryId(universityFiscalYear);
140:                List<String> encumberanceBalanceTypes = new ArrayList<String>();
141:                encumberanceBalanceTypes.add(option
142:                        .getExtrnlEncumFinBalanceTypCd());
143:                encumberanceBalanceTypes.add(option
144:                        .getIntrnlEncumFinBalanceTypCd());
145:                encumberanceBalanceTypes.add(option
146:                        .getPreencumbranceFinBalTypeCd());
147:                encumberanceBalanceTypes.add(option
148:                        .getCostShareEncumbranceBalanceTypeCd());
149:                return encumberanceBalanceTypes;
150:            }
151:
152:            /**
153:             * 
154:             * @see org.kuali.module.chart.service.BalanceTypService#getCurrentYearCostShareEncumbranceBalanceType()
155:             */
156:            public String getCurrentYearCostShareEncumbranceBalanceType() {
157:                return getCostShareEncumbranceBalanceType(universityDateService
158:                        .getCurrentFiscalYear());
159:            }
160:
161:            /**
162:             * 
163:             * @see org.kuali.module.chart.service.BalanceTypService#getCurrentYearEncumbranceBalanceTypes()
164:             */
165:            public List<String> getCurrentYearEncumbranceBalanceTypes() {
166:                return getEncumbranceBalanceTypes(universityDateService
167:                        .getCurrentFiscalYear());
168:            }
169:
170:            /**
171:             * 
172:             * @see org.kuali.module.chart.service.BalanceTypService#getContinuationAccountBypassBalanceTypeCodes(java.lang.Integer)
173:             */
174:            public List<String> getContinuationAccountBypassBalanceTypeCodes(
175:                    Integer universityFiscalYear) {
176:                Options option = optionsDao
177:                        .getByPrimaryId(universityFiscalYear);
178:                List<String> continuationAccountBypassBalanceTypes = new ArrayList<String>();
179:                continuationAccountBypassBalanceTypes.add(option
180:                        .getExtrnlEncumFinBalanceTypCd());
181:                continuationAccountBypassBalanceTypes.add(option
182:                        .getIntrnlEncumFinBalanceTypCd());
183:                continuationAccountBypassBalanceTypes.add(option
184:                        .getPreencumbranceFinBalTypeCd());
185:                return continuationAccountBypassBalanceTypes;
186:            }
187:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.