Source Code Cross Referenced for ObjLevel.java in  » ERP-CRM-Financial » Kuali-Financial-System » org » kuali » module » chart » 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.chart.bo 
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.bo;
017:
018:        import java.util.LinkedHashMap;
019:
020:        import org.apache.ojb.broker.PersistenceBroker;
021:        import org.apache.ojb.broker.PersistenceBrokerException;
022:        import org.kuali.core.bo.PersistableBusinessObjectBase;
023:        import org.kuali.core.service.BusinessObjectService;
024:        import org.kuali.kfs.context.SpringContext;
025:        import org.kuali.module.gl.bo.SufficientFundRebuild;
026:
027:        /**
028:         * 
029:         */
030:        public class ObjLevel extends PersistableBusinessObjectBase {
031:            private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger
032:                    .getLogger(ObjLevel.class);
033:
034:            private String chartOfAccountsCode;
035:            private String financialObjectLevelCode;
036:            private String financialObjectLevelName;
037:            private String financialObjectLevelShortNm;
038:            private boolean financialObjectLevelActiveIndicator;
039:            private String financialReportingSortCode;
040:            private String financialConsolidationObjectCode;
041:
042:            private ObjectCons financialConsolidationObject;
043:            private Chart chartOfAccounts;
044:
045:            /**
046:             * Constructs a ObjLevel.java.
047:             */
048:            public ObjLevel() {
049:                super ();
050:                this .financialConsolidationObject = new ObjectCons();
051:            }
052:
053:            /**
054:             * Gets the financialObjectLevelCode attribute.
055:             * 
056:             * @return Returns the financialObjectLevelCode
057:             */
058:            public String getFinancialObjectLevelCode() {
059:                return financialObjectLevelCode;
060:            }
061:
062:            /**
063:             * Sets the financialObjectLevelCode attribute.
064:             * 
065:             * @param financialObjectLevelCode The financialObjectLevelCode to set.
066:             */
067:            public void setFinancialObjectLevelCode(
068:                    String financialObjectLevelCode) {
069:                this .financialObjectLevelCode = financialObjectLevelCode;
070:            }
071:
072:            /**
073:             * Gets the financialObjectLevelName attribute.
074:             * 
075:             * @return Returns the financialObjectLevelName
076:             */
077:            public String getFinancialObjectLevelName() {
078:                return financialObjectLevelName;
079:            }
080:
081:            /**
082:             * Sets the financialObjectLevelName attribute.
083:             * 
084:             * @param financialObjectLevelName The financialObjectLevelName to set.
085:             */
086:            public void setFinancialObjectLevelName(
087:                    String financialObjectLevelName) {
088:                this .financialObjectLevelName = financialObjectLevelName;
089:            }
090:
091:            /**
092:             * Gets the financialObjectLevelShortNm attribute.
093:             * 
094:             * @return Returns the financialObjectLevelShortNm
095:             */
096:            public String getFinancialObjectLevelShortNm() {
097:                return financialObjectLevelShortNm;
098:            }
099:
100:            /**
101:             * Sets the financialObjectLevelShortNm attribute.
102:             * 
103:             * @param financialObjectLevelShortNm The financialObjectLevelShortNm to set.
104:             */
105:            public void setFinancialObjectLevelShortNm(
106:                    String financialObjectLevelShortNm) {
107:                this .financialObjectLevelShortNm = financialObjectLevelShortNm;
108:            }
109:
110:            /**
111:             * Gets the financialObjectLevelActiveIndicator attribute.
112:             * 
113:             * @return Returns the financialObjectLevelActiveIndicator
114:             */
115:            public boolean isFinancialObjectLevelActiveIndicator() {
116:                return financialObjectLevelActiveIndicator;
117:            }
118:
119:            /**
120:             * Sets the financialObjectLevelActiveIndicator attribute.
121:             * 
122:             * @param financialObjectLevelActiveIndicator The financialObjectLevelActiveIndicator to set.
123:             */
124:            public void setFinancialObjectLevelActiveIndicator(
125:                    boolean financialObjectLevelActiveIndicator) {
126:                this .financialObjectLevelActiveIndicator = financialObjectLevelActiveIndicator;
127:            }
128:
129:            /**
130:             * Gets the financialReportingSortCode attribute.
131:             * 
132:             * @return Returns the financialReportingSortCode
133:             */
134:            public String getFinancialReportingSortCode() {
135:                return financialReportingSortCode;
136:            }
137:
138:            /**
139:             * Sets the financialReportingSortCode attribute.
140:             * 
141:             * @param financialReportingSortCode The financialReportingSortCode to set.
142:             */
143:            public void setFinancialReportingSortCode(
144:                    String financialReportingSortCode) {
145:                this .financialReportingSortCode = financialReportingSortCode;
146:            }
147:
148:            public String getConsolidatedObjectCode() {
149:                return financialConsolidationObject
150:                        .getFinancialReportingSortCode();
151:            }
152:
153:            /**
154:             * Gets the financialConsolidationObject attribute.
155:             * 
156:             * @return Returns the financialConsolidationObject
157:             */
158:            public ObjectCons getFinancialConsolidationObject() {
159:                return financialConsolidationObject;
160:            }
161:
162:            /**
163:             * Sets the financialConsolidationObject attribute.
164:             * 
165:             * @param financialConsolidationObject The financialConsolidationObject to set.
166:             */
167:            public void setFinancialConsolidationObject(
168:                    ObjectCons financialConsolidationObject) {
169:                this .financialConsolidationObject = financialConsolidationObject;
170:            }
171:
172:            public String getChartOfAccountsCode() {
173:                return chartOfAccountsCode;
174:            }
175:
176:            /**
177:             * Gets the chartOfAccounts attribute.
178:             * 
179:             * @return Returns the chartOfAccounts
180:             */
181:            public Chart getChartOfAccounts() {
182:                return chartOfAccounts;
183:            }
184:
185:            /**
186:             * Sets the chartOfAccounts attribute.
187:             * 
188:             * @param chartOfAccounts The chartOfAccounts to set.
189:             * @deprecated
190:             */
191:            public void setChartOfAccounts(Chart chartOfAccounts) {
192:                this .chartOfAccounts = chartOfAccounts;
193:            }
194:
195:            /**
196:             * @return Returns the financialConsolidationObjectCode.
197:             */
198:            public String getFinancialConsolidationObjectCode() {
199:                return financialConsolidationObjectCode;
200:            }
201:
202:            /**
203:             * @param financialConsolidationObjectCode The financialConsolidationObjectCode to set.
204:             */
205:            public void setFinancialConsolidationObjectCode(
206:                    String financialConsolidationObjectCode) {
207:                this .financialConsolidationObjectCode = financialConsolidationObjectCode;
208:            }
209:
210:            /**
211:             * @see org.kuali.core.bo.BusinessObjectBase#toStringMapper()
212:             */
213:            protected LinkedHashMap toStringMapper() {
214:                LinkedHashMap m = new LinkedHashMap();
215:
216:                m.put("chartOfAccountsCode", this .chartOfAccountsCode);
217:                m
218:                        .put("financialObjectLevelCode",
219:                                this .financialObjectLevelCode);
220:
221:                return m;
222:            }
223:
224:            public void setChartOfAccountsCode(String chart) {
225:                this .chartOfAccountsCode = chart;
226:            }
227:
228:            @Override
229:            public void beforeUpdate(PersistenceBroker persistenceBroker)
230:                    throws PersistenceBrokerException {
231:                super .beforeUpdate(persistenceBroker);
232:                try {
233:                    // KULCOA-549: update the sufficient funds table
234:                    // get the current data from the database
235:                    BusinessObjectService boService = SpringContext
236:                            .getBean(BusinessObjectService.class);
237:                    ObjLevel originalObjLevel = (ObjLevel) boService
238:                            .retrieve(this );
239:
240:                    if (originalObjLevel != null) {
241:                        if (!originalObjLevel
242:                                .getFinancialConsolidationObjectCode().equals(
243:                                        getFinancialConsolidationObjectCode())) {
244:                            SufficientFundRebuild sfr = new SufficientFundRebuild();
245:                            sfr
246:                                    .setAccountFinancialObjectTypeCode(SufficientFundRebuild.REBUILD_OBJECT);
247:                            sfr.setChartOfAccountsCode(originalObjLevel
248:                                    .getChartOfAccountsCode());
249:                            sfr
250:                                    .setAccountNumberFinancialObjectCode(originalObjLevel
251:                                            .getFinancialConsolidationObjectCode());
252:                            if (boService.retrieve(sfr) == null) {
253:                                persistenceBroker.store(sfr);
254:                            }
255:                            sfr = new SufficientFundRebuild();
256:                            sfr
257:                                    .setAccountFinancialObjectTypeCode(SufficientFundRebuild.REBUILD_OBJECT);
258:                            sfr
259:                                    .setChartOfAccountsCode(getChartOfAccountsCode());
260:                            sfr
261:                                    .setAccountNumberFinancialObjectCode(getFinancialConsolidationObjectCode());
262:                            if (boService.retrieve(sfr) == null) {
263:                                persistenceBroker.store(sfr);
264:                            }
265:                        }
266:                    }
267:                } catch (Exception ex) {
268:                    LOG
269:                            .error(
270:                                    "Problem updating sufficient funds rebuild table: ",
271:                                    ex);
272:                }
273:            }
274:
275:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.