Source Code Cross Referenced for Query.java in  » ERP-CRM-Financial » SourceTap-CRM » org » ofbiz » rules » engine » 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 » org.ofbiz.rules.engine 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.ofbiz.rules.engine;
002:
003:        /**
004:         * <p><b>Title:</b> Query
005:         * <p><b>Description:</b> None
006:         * <p>Copyright (c) 1999 Steven J. Metsker.
007:         * <p>Copyright (c) 2001 The Open For Business Project - www.ofbiz.org
008:         *
009:         * <p>Permission is hereby granted, free of charge, to any person obtaining a
010:         *  copy of this software and associated documentation files (the "Software"),
011:         *  to deal in the Software without restriction, including without limitation
012:         *  the rights to use, copy, modify, merge, publish, distribute, sublicense,
013:         *  and/or sell copies of the Software, and to permit persons to whom the
014:         *  Software is furnished to do so, subject to the following conditions:
015:         *
016:         * <p>The above copyright notice and this permission notice shall be included
017:         *  in all copies or substantial portions of the Software.
018:         *
019:         * <p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
020:         *  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
021:         *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
022:         *  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
023:         *  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
024:         *  OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
025:         *  THE USE OR OTHER DEALINGS IN THE SOFTWARE.
026:         *
027:         * <br>
028:         * <p>A Query is a dynamic rule that stands outside of a program
029:         * and proves itself by referring to a program.
030:         *
031:         * @author Steven J. Metsker
032:         * @version 1.0
033:         */
034:        public class Query extends DynamicRule {
035:
036:            /**
037:             * Create a query from the given structures, to prove itself
038:             * against the given axiom source.
039:             *
040:             * @param   AxiomSource   the source to prove against
041:             *
042:             * @param   Structures   the structures to prove
043:             */
044:            public Query(AxiomSource as, Structure[] structures) {
045:                this (as, new Scope(structures), structures);
046:            }
047:
048:            /**
049:             * Create a query from the given rule's structures, to prove
050:             * itself against the given axiom source.
051:             *
052:             * @param   AxiomSource   the source to prove against
053:             *
054:             * @param   Rule   the rule that contains structures to prove
055:             */
056:            public Query(AxiomSource as, Rule rule) {
057:                this (as, rule.structures);
058:            }
059:
060:            /**
061:             * This constructor ensures that the structures in the query
062:             * are all "provable", meaning that they are capable of
063:             * proving themselves. Structures cannot achieve this, but
064:             * they can produce consulting versions of themselves, given
065:             * an axiom source. Evalutations and comparisons are
066:             * provable in themselves, and will ignore the axiom
067:             * source.
068:             */
069:            protected Query(AxiomSource as, Scope scope, Structure[] structures) {
070:                super (as, scope, provableStructures(as, scope, structures));
071:            }
072:
073:            /**
074:             * Create a query from the given structure, to prove itself
075:             * against the given axiom source.
076:             *
077:             * @param   AxiomSource   the source to prove against
078:             *
079:             * @param   Structures   the structure to prove
080:             */
081:            public Query(AxiomSource as, Structure structure) {
082:                this (as, new Structure[] { structure });
083:            }
084:
085:            /**
086:             * Create a query from the given structure, to prove itself
087:             * without any axiom source.
088:             *
089:             * For example new Query(new Comparison())
090:             *
091:             * @param   AxiomSource   the source to prove against
092:             *
093:             * @param   Structure   the structure to prove
094:             */
095:            public Query(Structure structure) {
096:                this (null, new Scope(), new Structure[] { structure });
097:            }
098:
099:            /**
100:             * Returns a string representation of this query.
101:             *
102:             * @return a string representation of this query.
103:             */
104:            public String toString() {
105:                StringBuffer buf = new StringBuffer();
106:
107:                for (int i = 0; i < structures.length; i++) {
108:                    if (i > 0) {
109:                        buf.append(", ");
110:                    }
111:                    buf.append(structures[i].toString());
112:                }
113:                return buf.toString();
114:            }
115:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.