Source Code Cross Referenced for KualiSystemCode.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 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.commons.lang.StringUtils;
021:        import org.kuali.core.bo.KualiCode;
022:        import org.kuali.core.bo.PersistableBusinessObjectBase;
023:        import org.kuali.core.inquiry.KualiInquirableImpl;
024:        import org.kuali.kfs.context.SpringContext;
025:        import org.kuali.kfs.service.KualiCodeService;
026:
027:        public class KualiSystemCode extends PersistableBusinessObjectBase
028:                implements  KualiCode {
029:
030:            static {
031:                KualiInquirableImpl.HACK_LIST.add(KualiSystemCode.class);
032:            }
033:
034:            private String code;
035:            private String name;
036:            private boolean active;
037:            protected String className;
038:            private boolean codeRetrieved;
039:
040:            public KualiSystemCode() {
041:                this .active = true;
042:                this .codeRetrieved = false;
043:                this .className = this .getClass().getName();
044:            }
045:
046:            public KualiSystemCode(String code) {
047:                this .code = code;
048:                this .active = true;
049:                this .codeRetrieved = false;
050:                this .className = this .getClass().getName();
051:            }
052:
053:            /**
054:             * @return Getter for the Code.
055:             */
056:            public String getCode() {
057:                return code;
058:            }
059:
060:            /**
061:             * @param code - Setter for the Code.
062:             */
063:            public void setCode(String code) {
064:                this .code = code;
065:            }
066:
067:            /**
068:             * @return Getter for the Name.
069:             */
070:            public String getName() {
071:                if (!codeRetrieved && getCode() != null) {
072:                    KualiSystemCode code = (KualiSystemCode) SpringContext
073:                            .getBean(KualiCodeService.class).getSystemCode(
074:                                    this .getClass(), getCode());
075:                    code.setCodeRetrieved(true);
076:                    this .name = code.getName();
077:                    this .active = code.isActive();
078:                    this .codeRetrieved = true;
079:                }
080:                return name;
081:            }
082:
083:            /**
084:             * @param name - Setter for the name.
085:             */
086:            public void setName(String name) {
087:                this .name = name;
088:            }
089:
090:            /**
091:             * @return Getter for the active field.
092:             */
093:            public boolean isActive() {
094:                if (!codeRetrieved && getCode() != null) {
095:                    KualiSystemCode code = (KualiSystemCode) SpringContext
096:                            .getBean(KualiCodeService.class).getSystemCode(
097:                                    this .getClass(), getCode());
098:                    code.setCodeRetrieved(true);
099:                    name = code.getName();
100:                    active = code.isActive();
101:                    codeRetrieved = true;
102:                }
103:                return active;
104:            }
105:
106:            /**
107:             * @param name - Setter for the active field.
108:             */
109:            public void setActive(boolean a) {
110:                this .active = a;
111:            }
112:
113:            /**
114:             * @return Returns the className.
115:             */
116:            public String getClassName() {
117:                return className;
118:            }
119:
120:            /**
121:             * @param ojbConcreteClass The ojbConcreteClass to set.
122:             */
123:            public void setClassName(String ojbConcreteClass) {
124:                this .className = ojbConcreteClass;
125:            }
126:
127:            /**
128:             * @return Returns the codeRetrieved.
129:             */
130:            public boolean isCodeRetrieved() {
131:                return codeRetrieved;
132:            }
133:
134:            /**
135:             * @param codeRetrieved The codeRetrieved to set.
136:             */
137:            public void setCodeRetrieved(boolean codeRetrieved) {
138:                this .codeRetrieved = codeRetrieved;
139:            }
140:
141:            /**
142:             * @see org.kuali.core.bo.BusinessObjectBase#toStringMapper()
143:             */
144:            final protected LinkedHashMap toStringMapper() {
145:                LinkedHashMap m = new LinkedHashMap();
146:
147:                m.put("code", getCode());
148:
149:                return m;
150:            }
151:
152:            /**
153:             * Implements equals comparing code to code.
154:             * 
155:             * @see java.lang.Object#equals(java.lang.Object)
156:             */
157:            public boolean equals(Object obj) {
158:                if (obj instanceof  KualiSystemCode) {
159:                    return StringUtils.equals(this .getCode(),
160:                            ((KualiSystemCode) obj).getCode());
161:                }
162:                return false;
163:            }
164:
165:            /**
166:             * Overriding equals requires writing a hashCode method.
167:             * 
168:             * @see java.lang.Object#hashCode()
169:             */
170:            public int hashCode() {
171:                int hashCode = 0;
172:
173:                if (getCode() != null) {
174:                    hashCode = getCode().hashCode();
175:                }
176:
177:                return hashCode;
178:            }
179:
180:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.