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


001:        /*
002:         * Copyright 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:
017:        package org.kuali.module.labor.bo;
018:
019:        import java.util.ArrayList;
020:        import java.util.List;
021:
022:        import org.kuali.core.bo.user.PersonPayrollId;
023:        import org.kuali.core.bo.user.UniversalUser;
024:        import org.kuali.core.bo.user.UserId;
025:        import org.kuali.core.exceptions.UserNotFoundException;
026:        import org.kuali.core.service.UniversalUserService;
027:        import org.kuali.core.util.KualiDecimal;
028:        import org.kuali.kfs.KFSPropertyConstants;
029:        import org.kuali.kfs.context.SpringContext;
030:        import org.kuali.module.labor.LaborConstants;
031:
032:        /**
033:         * Labor business object for Account Status (Current Funds).
034:         */
035:        public class AccountStatusCurrentFunds extends LedgerBalance {
036:            private String personName;
037:            private KualiDecimal outstandingEncum;
038:            private KualiDecimal july1BudgetAmount;
039:            private KualiDecimal annualActualAmount;
040:            private KualiDecimal variance;
041:
042:            /**
043:             * Constructs an AccountStatusCurrentFunds.java.
044:             */
045:            public AccountStatusCurrentFunds() {
046:                super ();
047:                setMonth1Amount(KualiDecimal.ZERO);
048:                this .setOutstandingEncum(KualiDecimal.ZERO);
049:                this .setVariance(KualiDecimal.ZERO);
050:                this .setJuly1BudgetAmount(KualiDecimal.ZERO);
051:                this .setAnnualActualAmount(KualiDecimal.ZERO);
052:            }
053:
054:            /**
055:             * Gets the person name
056:             * 
057:             * @return the person name
058:             */
059:            public String getPersonName() {
060:                UserId empl = new PersonPayrollId(getEmplid());
061:                UniversalUser universalUser = null;
062:
063:                try {
064:                    universalUser = SpringContext.getBean(
065:                            UniversalUserService.class).getUniversalUser(empl);
066:                } catch (UserNotFoundException e) {
067:                    return LaborConstants.BalanceInquiries.UnknownPersonName;
068:                }
069:
070:                return universalUser.getPersonName();
071:            }
072:
073:            /**
074:             * Sets the persons name
075:             * 
076:             * @param personName
077:             */
078:            public void setPersonName(String personName) {
079:                this .personName = personName;
080:            }
081:
082:            /**
083:             * Gets an outstanding encumberance value
084:             * 
085:             * @return outstanding encumberance value
086:             */
087:            public KualiDecimal getOutstandingEncum() {
088:                return outstandingEncum;
089:            }
090:
091:            /**
092:             * Sets an outstanding encumberance value
093:             * 
094:             * @param outstandingEncum
095:             */
096:            public void setOutstandingEncum(KualiDecimal outstandingEncum) {
097:                this .outstandingEncum = outstandingEncum;
098:            }
099:
100:            /**
101:             * Gets the Jul1BudgerAmount
102:             * 
103:             * @return July1st amount
104:             */
105:            public KualiDecimal getJuly1BudgetAmount() {
106:                return july1BudgetAmount;
107:            }
108:
109:            /**
110:             * Sets the july1BudgetAmount
111:             * 
112:             * @param july1BudgetAmount
113:             */
114:            public void setJuly1BudgetAmount(KualiDecimal july1BudgetAmount) {
115:                this .july1BudgetAmount = july1BudgetAmount;
116:            }
117:
118:            /**
119:             * Gets the variance which is calculated by substracting from July1BudgetAmount the YTD Actual, and outstanding encumbrance.
120:             * 
121:             * @return
122:             */
123:            public KualiDecimal getVariance() {
124:                return this .getJuly1BudgetAmount().subtract(
125:                        getAnnualActualAmount())
126:                        .subtract(getOutstandingEncum());
127:            }
128:
129:            /**
130:             * Sets the variance which is calculated by substracting from July1BudgetAmount the YTD Actual, and outstanding encumbrance.
131:             * 
132:             * @param variance
133:             */
134:            public void setVariance(KualiDecimal variance) {
135:                this .variance = variance;
136:            }
137:
138:            /**
139:             * Returns a list of keys used to generate a query.
140:             * 
141:             * @param consolidated
142:             * @return a list with the keys needed to generate a query
143:             */
144:            public List<String> getKeyFieldList(boolean consolidated) {
145:                List<String> primaryKeyList = new ArrayList<String>();
146:                primaryKeyList.add(KFSPropertyConstants.UNIVERSITY_FISCAL_YEAR);
147:                primaryKeyList.add(KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE);
148:                primaryKeyList.add(KFSPropertyConstants.ACCOUNT_NUMBER);
149:
150:                if (!consolidated) {
151:                    primaryKeyList.add(KFSPropertyConstants.SUB_ACCOUNT_NUMBER);
152:                }
153:
154:                primaryKeyList.add(KFSPropertyConstants.FINANCIAL_OBJECT_CODE);
155:
156:                if (!consolidated) {
157:                    primaryKeyList
158:                            .add(KFSPropertyConstants.FINANCIAL_SUB_OBJECT_CODE);
159:                }
160:                primaryKeyList.add(KFSPropertyConstants.POSITION_NUMBER);
161:                primaryKeyList.add(KFSPropertyConstants.EMPLID);
162:
163:                return primaryKeyList;
164:            }
165:
166:            /**
167:             * Gets the annualActualAmount attribute.
168:             * 
169:             * @return Returns the annualActualAmount.
170:             */
171:            public KualiDecimal getAnnualActualAmount() {
172:                return this .getAccountLineAnnualBalanceAmount().add(
173:                        this .getContractsGrantsBeginningBalanceAmount());
174:            }
175:
176:            /**
177:             * Sets the annualActualAmount attribute value.
178:             * 
179:             * @param annualActualAmount The annualActualAmount to set.
180:             */
181:            public void setAnnualActualAmount(KualiDecimal annualActualAmount) {
182:                this.annualActualAmount = annualActualAmount;
183:            }
184:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.