Source Code Cross Referenced for BudgetAdjustmentAccountingLineUtil.java in  » ERP-CRM-Financial » Kuali-Financial-System » org » kuali » module » financial » 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.financial.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:        package org.kuali.module.financial.bo;
017:
018:        import java.util.Map;
019:
020:        import org.kuali.core.util.KualiDecimal;
021:        import org.kuali.core.util.KualiInteger;
022:        import org.kuali.kfs.bo.AccountingLine;
023:
024:        /**
025:         * This class is a utility class to consolidate budget adjustment accounting line code
026:         */
027:        public class BudgetAdjustmentAccountingLineUtil {
028:            /**
029:             * Initialize attributes
030:             * 
031:             * @param accountingLine
032:             */
033:            public static void init(
034:                    BudgetAdjustmentAccountingLine accountingLine) {
035:                accountingLine
036:                        .setCurrentBudgetAdjustmentAmount(KualiDecimal.ZERO);
037:                accountingLine.setBaseBudgetAdjustmentAmount(KualiInteger.ZERO);
038:                accountingLine
039:                        .setFinancialDocumentMonth1LineAmount(KualiDecimal.ZERO);
040:                accountingLine
041:                        .setFinancialDocumentMonth2LineAmount(KualiDecimal.ZERO);
042:                accountingLine
043:                        .setFinancialDocumentMonth3LineAmount(KualiDecimal.ZERO);
044:                accountingLine
045:                        .setFinancialDocumentMonth4LineAmount(KualiDecimal.ZERO);
046:                accountingLine
047:                        .setFinancialDocumentMonth5LineAmount(KualiDecimal.ZERO);
048:                accountingLine
049:                        .setFinancialDocumentMonth6LineAmount(KualiDecimal.ZERO);
050:                accountingLine
051:                        .setFinancialDocumentMonth7LineAmount(KualiDecimal.ZERO);
052:                accountingLine
053:                        .setFinancialDocumentMonth8LineAmount(KualiDecimal.ZERO);
054:                accountingLine
055:                        .setFinancialDocumentMonth9LineAmount(KualiDecimal.ZERO);
056:                accountingLine
057:                        .setFinancialDocumentMonth10LineAmount(KualiDecimal.ZERO);
058:                accountingLine
059:                        .setFinancialDocumentMonth11LineAmount(KualiDecimal.ZERO);
060:                accountingLine
061:                        .setFinancialDocumentMonth12LineAmount(KualiDecimal.ZERO);
062:                accountingLine.setFringeBenefitIndicator(false);
063:            }
064:
065:            /**
066:             * Adds {@link BudgetAdjustmentAccountingLine} attributes to map
067:             * 
068:             * @param simpleValues map used to add values to
069:             * @param accountingLine accounting line that provides attributes to add to map
070:             * @return
071:             */
072:            public static Map appendToValuesMap(Map simpleValues,
073:                    BudgetAdjustmentAccountingLine accountingLine) {
074:                simpleValues.put("currentBudgetAdjustmentAmount",
075:                        accountingLine.getCurrentBudgetAdjustmentAmount());
076:                simpleValues.put("baseBudgetAdjustmentAmount", accountingLine
077:                        .getBaseBudgetAdjustmentAmount());
078:                simpleValues.put("financialDocumentMonth1LineAmount",
079:                        accountingLine.getFinancialDocumentMonth1LineAmount());
080:                simpleValues.put("financialDocumentMonth2LineAmount",
081:                        accountingLine.getFinancialDocumentMonth2LineAmount());
082:                simpleValues.put("financialDocumentMonth3LineAmount",
083:                        accountingLine.getFinancialDocumentMonth3LineAmount());
084:                simpleValues.put("financialDocumentMonth4LineAmount",
085:                        accountingLine.getFinancialDocumentMonth4LineAmount());
086:                simpleValues.put("financialDocumentMonth5LineAmount",
087:                        accountingLine.getFinancialDocumentMonth5LineAmount());
088:                simpleValues.put("financialDocumentMonth6LineAmount",
089:                        accountingLine.getFinancialDocumentMonth6LineAmount());
090:                simpleValues.put("financialDocumentMonth7LineAmount",
091:                        accountingLine.getFinancialDocumentMonth7LineAmount());
092:                simpleValues.put("financialDocumentMonth8LineAmount",
093:                        accountingLine.getFinancialDocumentMonth8LineAmount());
094:                simpleValues.put("financialDocumentMonth9LineAmount",
095:                        accountingLine.getFinancialDocumentMonth9LineAmount());
096:                simpleValues.put("financialDocumentMonth10LineAmount",
097:                        accountingLine.getFinancialDocumentMonth10LineAmount());
098:                simpleValues.put("financialDocumentMonth11LineAmount",
099:                        accountingLine.getFinancialDocumentMonth11LineAmount());
100:                simpleValues.put("financialDocumentMonth12LineAmount",
101:                        accountingLine.getFinancialDocumentMonth12LineAmount());
102:
103:                return simpleValues;
104:            }
105:
106:            /**
107:             * Copies {@link BudgetAdjustmentAccountingLine} values
108:             * 
109:             * @param toLine the line to copy values to
110:             * @param fromLine the line to take the values to use in writing to the toLine
111:             */
112:            public static void copyFrom(BudgetAdjustmentAccountingLine toLine,
113:                    AccountingLine other) {
114:                if (BudgetAdjustmentAccountingLine.class.isAssignableFrom(other
115:                        .getClass())) {
116:                    BudgetAdjustmentAccountingLine fromLine = (BudgetAdjustmentAccountingLine) other;
117:                    if (toLine != fromLine) {
118:                        toLine.setCurrentBudgetAdjustmentAmount(fromLine
119:                                .getCurrentBudgetAdjustmentAmount());
120:                        toLine.setBaseBudgetAdjustmentAmount(fromLine
121:                                .getBaseBudgetAdjustmentAmount());
122:                        toLine.setFinancialDocumentMonth1LineAmount(fromLine
123:                                .getFinancialDocumentMonth1LineAmount());
124:                        toLine.setFinancialDocumentMonth2LineAmount(fromLine
125:                                .getFinancialDocumentMonth2LineAmount());
126:                        toLine.setFinancialDocumentMonth3LineAmount(fromLine
127:                                .getFinancialDocumentMonth3LineAmount());
128:                        toLine.setFinancialDocumentMonth4LineAmount(fromLine
129:                                .getFinancialDocumentMonth4LineAmount());
130:                        toLine.setFinancialDocumentMonth5LineAmount(fromLine
131:                                .getFinancialDocumentMonth5LineAmount());
132:                        toLine.setFinancialDocumentMonth6LineAmount(fromLine
133:                                .getFinancialDocumentMonth6LineAmount());
134:                        toLine.setFinancialDocumentMonth7LineAmount(fromLine
135:                                .getFinancialDocumentMonth7LineAmount());
136:                        toLine.setFinancialDocumentMonth8LineAmount(fromLine
137:                                .getFinancialDocumentMonth8LineAmount());
138:                        toLine.setFinancialDocumentMonth9LineAmount(fromLine
139:                                .getFinancialDocumentMonth9LineAmount());
140:                        toLine.setFinancialDocumentMonth10LineAmount(fromLine
141:                                .getFinancialDocumentMonth10LineAmount());
142:                        toLine.setFinancialDocumentMonth11LineAmount(fromLine
143:                                .getFinancialDocumentMonth11LineAmount());
144:                        toLine.setFinancialDocumentMonth12LineAmount(fromLine
145:                                .getFinancialDocumentMonth12LineAmount());
146:                        toLine.setFringeBenefitIndicator(fromLine
147:                                .isFringeBenefitIndicator());
148:                    }
149:                }
150:            }
151:
152:            /**
153:             * Calculates monthlyLines total amount@param accountingLine
154:             * 
155:             * @return KualiDecimal sum of all monthly line amounts
156:             */
157:            public static KualiDecimal getMonthlyLinesTotal(
158:                    BudgetAdjustmentAccountingLine accountingLine) {
159:                KualiDecimal total = KualiDecimal.ZERO;
160:                if (accountingLine.getFinancialDocumentMonth1LineAmount() != null) {
161:                    total = total.add(accountingLine
162:                            .getFinancialDocumentMonth1LineAmount());
163:                }
164:                if (accountingLine.getFinancialDocumentMonth2LineAmount() != null) {
165:                    total = total.add(accountingLine
166:                            .getFinancialDocumentMonth2LineAmount());
167:                }
168:                if (accountingLine.getFinancialDocumentMonth3LineAmount() != null) {
169:                    total = total.add(accountingLine
170:                            .getFinancialDocumentMonth3LineAmount());
171:                }
172:                if (accountingLine.getFinancialDocumentMonth4LineAmount() != null) {
173:                    total = total.add(accountingLine
174:                            .getFinancialDocumentMonth4LineAmount());
175:                }
176:                if (accountingLine.getFinancialDocumentMonth5LineAmount() != null) {
177:                    total = total.add(accountingLine
178:                            .getFinancialDocumentMonth5LineAmount());
179:                }
180:                if (accountingLine.getFinancialDocumentMonth6LineAmount() != null) {
181:                    total = total.add(accountingLine
182:                            .getFinancialDocumentMonth6LineAmount());
183:                }
184:                if (accountingLine.getFinancialDocumentMonth7LineAmount() != null) {
185:                    total = total.add(accountingLine
186:                            .getFinancialDocumentMonth7LineAmount());
187:                }
188:                if (accountingLine.getFinancialDocumentMonth8LineAmount() != null) {
189:                    total = total.add(accountingLine
190:                            .getFinancialDocumentMonth8LineAmount());
191:                }
192:                if (accountingLine.getFinancialDocumentMonth9LineAmount() != null) {
193:                    total = total.add(accountingLine
194:                            .getFinancialDocumentMonth9LineAmount());
195:                }
196:                if (accountingLine.getFinancialDocumentMonth10LineAmount() != null) {
197:                    total = total.add(accountingLine
198:                            .getFinancialDocumentMonth10LineAmount());
199:                }
200:                if (accountingLine.getFinancialDocumentMonth11LineAmount() != null) {
201:                    total = total.add(accountingLine
202:                            .getFinancialDocumentMonth11LineAmount());
203:                }
204:                if (accountingLine.getFinancialDocumentMonth12LineAmount() != null) {
205:                    total = total.add(accountingLine
206:                            .getFinancialDocumentMonth12LineAmount());
207:                }
208:                return total;
209:            }
210:
211:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.