Source Code Cross Referenced for UIReportOrderBy.java in  » ERP-CRM-Financial » SourceTap-CRM » com » sourcetap » sfa » ui » 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 » SourceTap CRM » com.sourcetap.sfa.ui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package com.sourcetap.sfa.ui;
002:
003:        import java.util.ArrayList;
004:        import java.util.Iterator;
005:        import java.util.List;
006:
007:        import org.ofbiz.base.util.Debug;
008:        import org.ofbiz.base.util.UtilMisc;
009:        import org.ofbiz.entity.GenericDelegator;
010:        import org.ofbiz.entity.GenericEntityException;
011:        import org.ofbiz.entity.GenericValue;
012:
013:        public class UIReportOrderBy {
014:            public static final String module = UIReportOrderBy.class.getName();
015:
016:            protected String reportOrderId;
017:            protected String reportId;
018:            protected String attributeId;
019:            protected int sortOrder;
020:            protected String displayLabel;
021:
022:            protected boolean attNameLoaded = false;
023:            protected String attributeName;
024:            protected String entityName;
025:
026:            protected GenericDelegator delegator;
027:
028:            public static List loadFromGVL(List reportOrderByGVL) {
029:                List retList = new ArrayList();
030:                Iterator iter = reportOrderByGVL.iterator();
031:                while (iter.hasNext()) {
032:                    GenericValue gv = (GenericValue) iter.next();
033:                    retList.add(new UIReportOrderBy(gv));
034:                }
035:                return retList;
036:            }
037:
038:            public UIReportOrderBy(GenericValue genricValue) {
039:                setReportOrderId(genricValue.getString("reportOrderId"));
040:                setReportId(genricValue.getString("reportId"));
041:                setAttributeId(genricValue.getString("attributeId"));
042:                setDisplayLabel(genricValue.getString("displayLabel"));
043:                setSortOrder(genricValue.getString("sortOrder"));
044:
045:                setDelegator(genricValue.getDelegator());
046:            }
047:
048:            public UIReportOrderBy(String attributeId, int sortOrder,
049:                    String displayLabel) {
050:                setAttributeId(attributeId);
051:                setSortOrder(sortOrder);
052:                setDisplayLabel(displayLabel);
053:            }
054:
055:            public void loadEntityAttributeInfo(GenericDelegator delegator,
056:                    String attributeId) {
057:                try {
058:                    List eaGVL = delegator.findByAnd("UiEntityAttribute",
059:                            UtilMisc.toMap("attributeId", attributeId));
060:                    GenericValue eaGV = (GenericValue) eaGVL.get(0);
061:
062:                    setEntityName(eaGV.getString("entityName"));
063:                    setAttributeName(eaGV.getString("attributeName"));
064:                    attNameLoaded = true;
065:
066:                } catch (GenericEntityException e) {
067:                    // TODO Auto-generated catch block
068:                    e.printStackTrace();
069:                }
070:            }
071:
072:            /**
073:             * @return
074:             */
075:            public String getAttributeId() {
076:                return attributeId;
077:            }
078:
079:            /**
080:             * @return
081:             */
082:            public String getAttributeName() {
083:                if (!attNameLoaded)
084:                    loadEntityAttributeInfo(getDelegator(), getAttributeId());
085:                return attributeName;
086:            }
087:
088:            /**
089:             * @return
090:             */
091:            public GenericDelegator getDelegator() {
092:                return delegator;
093:            }
094:
095:            /**
096:             * @return
097:             */
098:            public String getEntityName() {
099:                if (!attNameLoaded)
100:                    loadEntityAttributeInfo(getDelegator(), getAttributeId());
101:                return entityName;
102:            }
103:
104:            /**
105:             * @return
106:             */
107:            public String getReportId() {
108:                return reportId;
109:            }
110:
111:            /**
112:             * @return
113:             */
114:            public String getReportOrderId() {
115:                return reportOrderId;
116:            }
117:
118:            /**
119:             * @return
120:             */
121:            public int getSortOrder() {
122:                return sortOrder;
123:            }
124:
125:            /**
126:             * @param string
127:             */
128:            public void setAttributeId(String string) {
129:                attributeId = string;
130:            }
131:
132:            /**
133:             * @param string
134:             */
135:            public void setAttributeName(String string) {
136:                attributeName = string;
137:            }
138:
139:            /**
140:             * @param delegator
141:             */
142:            public void setDelegator(GenericDelegator delegator) {
143:                this .delegator = delegator;
144:            }
145:
146:            /**
147:             * @param string
148:             */
149:            public void setEntityName(String string) {
150:                entityName = string;
151:            }
152:
153:            /**
154:             * @param string
155:             */
156:            public void setReportId(String string) {
157:                reportId = string;
158:            }
159:
160:            /**
161:             * @param string
162:             */
163:            public void setReportOrderId(String string) {
164:                reportOrderId = string;
165:            }
166:
167:            /**
168:             * @param i
169:             */
170:            public void setSortOrder(int i) {
171:                sortOrder = i;
172:            }
173:
174:            /**
175:             * @param s
176:             */
177:            public void setSortOrder(String s) {
178:                try {
179:                    sortOrder = Integer.valueOf(s).intValue();
180:                } catch (NumberFormatException e) {
181:                    Debug.logError("error converting sortOrder to int: " + s,
182:                            module);
183:                }
184:            }
185:
186:            /**
187:             * @return
188:             */
189:            public String getDisplayLabel() {
190:                return displayLabel;
191:            }
192:
193:            /**
194:             * @param string
195:             */
196:            public void setDisplayLabel(String string) {
197:                displayLabel = string;
198:            }
199:
200:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.