Source Code Cross Referenced for UIQueryValue.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:        /*
002:         * 
003:         * Copyright (c) 2004 SourceTap - www.sourcetap.com
004:         *
005:         *  The contents of this file are subject to the SourceTap Public License 
006:         * ("License"); You may not use this file except in compliance with the 
007:         * License. You may obtain a copy of the License at http://www.sourcetap.com/license.htm
008:         * Software distributed under the License is distributed on an  "AS IS"  basis,
009:         * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
010:         * the specific language governing rights and limitations under the License.
011:         *
012:         * The above copyright notice and this permission notice shall be included
013:         * in all copies or substantial portions of the Software.
014:         *
015:         */
016:
017:        package com.sourcetap.sfa.ui;
018:
019:        import org.ofbiz.entity.GenericDelegator;
020:        import org.ofbiz.entity.GenericValue;
021:        import org.ofbiz.entity.condition.EntityComparisonOperator;
022:
023:        /**
024:         * This class holds the attributes of one value within a query used in the UI builder.
025:         *
026:         * @author  <a href='mailto:jnutting@sourcetap.com'>John Nutting</a>
027:         * @see #UIQuery
028:         */
029:        public class UIQueryValue {
030:            public static final String module = UIQueryValue.class.getName();
031:
032:            /*
033:             * Query Value ID - Uniquely identifies this query value
034:             */
035:            protected String queryValueId = "";
036:
037:            /*
038:             * Query ID - Uniquely identifies the query to which this query value is attached
039:             */
040:            protected String queryId = "";
041:
042:            /*
043:             * Attribute ID - Uniquely identifies an attribute defined in the UI data
044:             */
045:            protected String attributeId = "";
046:
047:            /*
048:             * Attribute Value - The value to be compared to the specified attribute on entities in the data base
049:             *    when the query is executed
050:             */
051:            protected String attributeValue = "";
052:
053:            /*
054:             * Entity Operator - The operator to be used to compare the value to the specified attribute on
055:             *    entities in the data base when the query is executed
056:             */
057:            protected EntityComparisonOperator entityOperator = null;
058:
059:            /*
060:             * Dislay Type Id - The type of the field being queried, which is used to determine how to add the condition. 
061:             * This allows for SELECT fields to be searched on lookup tables
062:             */
063:            protected String displayTypeId = "";
064:            /*
065:             * Dislay Object Id - The display object of the field being queried, which is used to determine how to add the condition. 
066:             * This allows for SELECT fields to be searched on lookup tables
067:             */
068:            protected String displayObjectId = "";
069:
070:            /**
071:             * Basic constructor
072:             * @author  <a href='mailto:jnutting@sourcetap.com'>John Nutting</a>
073:             */
074:            public UIQueryValue() {
075:            }
076:
077:            /**
078:             * Constructor with initial values
079:             * @param queryvalueId_ Query Value ID - Uniquely identifies this query value
080:             * @param queryId_ Query ID - Uniquely identifies the query to which this query value is attached
081:             * @param attributeId_ Attribute ID - Uniquely identifies an attribute defined in the UI data
082:             * @param attributeValue_ The value to be compared to the specified attribute on entities in the data base
083:             *    when the query is executed
084:             * @param entityOperator_ The operator to be used to compare the value to the specified attribute on
085:             *    entities in the data base when the query is executed
086:             * @author  <a href='mailto:jnutting@sourcetap.com'>John Nutting</a>
087:             */
088:            public UIQueryValue(String queryValueId_, String queryId_,
089:                    String attributeId_, String attributeValue_,
090:                    EntityComparisonOperator entityOperator_,
091:                    String displayTypeId_, String displayObjectId_) {
092:
093:                setQueryValueId(queryValueId_);
094:                setAttributeId(attributeId_);
095:                setQueryId(queryId_);
096:                setAttributeValue(attributeValue_);
097:                setEntityOperator(entityOperator_);
098:                setDisplayTypeId(displayTypeId_);
099:                setDisplayObjectId(displayObjectId_);
100:            }
101:
102:            /**
103:             * Gets the Query Value ID
104:             * @return_ Query Value ID - Uniquely identifies this query value
105:             * @author  <a href='mailto:jnutting@sourcetap.com'>John Nutting</a>
106:             */
107:            public String getQueryValueId() {
108:                return (queryValueId == null) ? "" : queryValueId;
109:            }
110:
111:            /**
112:             * Sets the Query Value ID
113:             * @param queryvalueId_ Query Value ID - Uniquely identifies this query value
114:             * @author  <a href='mailto:jnutting@sourcetap.com'>John Nutting</a>
115:             */
116:            public void setQueryValueId(String queryValueId_) {
117:                queryValueId = queryValueId_;
118:
119:                return;
120:            }
121:
122:            /**
123:             * Gets the Query ID
124:             * @param queryId_ Query ID - Uniquely identifies the query to which this query value is attached
125:             * @author  <a href='mailto:jnutting@sourcetap.com'>John Nutting</a>
126:             */
127:            public String getQueryId() {
128:                return (queryId == null) ? "" : queryId;
129:            }
130:
131:            /**
132:             * Sets the Query ID
133:             * @return Query ID - Uniquely identifies the query to which this query value is attached
134:             * @author  <a href='mailto:jnutting@sourcetap.com'>John Nutting</a>
135:             */
136:            public void setQueryId(String queryId_) {
137:                queryId = queryId_;
138:
139:                return;
140:            }
141:
142:            /**
143:             * Gets the attribute ID
144:             * @param attributeId_ Attribute ID - Uniquely identifies an attribute defined in the UI data
145:             */
146:            public String getAttributeId() {
147:                return (attributeId == null) ? "" : attributeId;
148:            }
149:
150:            /**
151:             * Sets the attribute ID
152:             * @return Attribute ID - Uniquely identifies an attribute defined in the UI data
153:             * @author  <a href='mailto:jnutting@sourcetap.com'>John Nutting</a>
154:             */
155:            public void setAttributeId(String attributeId_) {
156:                attributeId = attributeId_;
157:
158:                return;
159:            }
160:
161:            /**
162:             * Gets the Attribute Value
163:             * return Attribute Value - The value to be compared to the specified attribute on entities in the data base
164:             *    when the query is executed
165:             * @author  <a href='mailto:jnutting@sourcetap.com'>John Nutting</a>
166:             */
167:            public String getAttributeValue() {
168:                return (attributeValue == null) ? "" : attributeValue;
169:            }
170:
171:            /**
172:             * Sets the Attribute Value
173:             * @param attributeValue_ Attribute Value - The value to be compared to the specified attribute on entities in the data base
174:             *    when the query is executed
175:             * @author  <a href='mailto:jnutting@sourcetap.com'>John Nutting</a>
176:             */
177:            public void setAttributeValue(String attributeValue_) {
178:                attributeValue = attributeValue_;
179:
180:                return;
181:            }
182:
183:            /**
184:             * Gets the Query Operator
185:             * @return The operator to be used to compare the value to the specified attribute on
186:             *    entities in the data base when the query is executed
187:             * @author  <a href='mailto:jnutting@sourcetap.com'>John Nutting</a>
188:             */
189:            public EntityComparisonOperator getEntityOperator() {
190:                return entityOperator;
191:            }
192:
193:            /**
194:             * Sets the Query Operator
195:             * @param entityOperator_ The operator to be used to compare the value to the specified attribute on
196:             *    entities in the data base when the query is executed
197:             * @author  <a href='mailto:jnutting@sourcetap.com'>John Nutting</a>
198:             */
199:            public void setEntityOperator(
200:                    EntityComparisonOperator entityOperator_) {
201:                entityOperator = entityOperator_;
202:
203:                return;
204:            }
205:
206:            /**
207:             * Gets the Display Type ID
208:             * @return_ Display Type ID - What type is used to display the field
209:             * @author  <a href='mailto:jnutting@sourcetap.com'>John Nutting</a>
210:             */
211:            public String getDisplayTypeId() {
212:                return (displayTypeId == null) ? "" : displayTypeId;
213:            }
214:
215:            /**
216:             * Sets the Display Type ID
217:             * @param displayTypeId_ - the display type for the field
218:             * @author  <a href='mailto:jnutting@sourcetap.com'>John Nutting</a>
219:             */
220:            public void setDisplayTypeId(String displayTypeId_) {
221:                displayTypeId = displayTypeId_;
222:                return;
223:            }
224:
225:            /**
226:             * Gets the Display Object ID
227:             * @return_ Display Type ID - What object  is used to display the field
228:             * @author  <a href='mailto:jnutting@sourcetap.com'>John Nutting</a>
229:             */
230:            public String getDisplayObjectId() {
231:                return (displayObjectId == null) ? "" : displayObjectId;
232:            }
233:
234:            /**
235:             * Sets the Display Object ID
236:             * @param displayObjectId_ - the display object for the field
237:             * @author  <a href='mailto:jnutting@sourcetap.com'>John Nutting</a>
238:             */
239:            public void setDisplayObjectId(String displayObjectId_) {
240:                displayObjectId = displayObjectId_;
241:                return;
242:            }
243:
244:            /**
245:             * Creates a generic value for this query value.
246:             * @param delegator Generic delegator object required to attach to the correct data source
247:             * @return Generic value representing this query value
248:             * @author  <a href='mailto:jnutting@sourcetap.com'>John Nutting</a>
249:             */
250:            public GenericValue toGenericValue(GenericDelegator delegator) {
251:
252:                GenericValue uiQueryValueGV = new GenericValue(delegator
253:                        .getModelEntity("UiQueryValue"));
254:                uiQueryValueGV.setDelegator(delegator);
255:                uiQueryValueGV.set("queryValueId", getQueryValueId());
256:                uiQueryValueGV.set("queryId", getQueryId());
257:                uiQueryValueGV.set("attributeId", getAttributeId());
258:                uiQueryValueGV.set("attributeValue", getAttributeValue());
259:                uiQueryValueGV.set("queryOperatorId",
260:                        (getEntityOperator() == null) ? "1" : String
261:                                .valueOf(getEntityOperator().getId()));
262:                uiQueryValueGV.set("displayTypeId", getDisplayTypeId());
263:                uiQueryValueGV.set("displayObjectId", getDisplayObjectId());
264:
265:                return uiQueryValueGV;
266:            }
267:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.