Source Code Cross Referenced for SearchQueryHandler.java in  » Database-ORM » MMBase » org » mmbase » storage » search » 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 » Database ORM » MMBase » org.mmbase.storage.search 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:
003:        This software is OSI Certified Open Source Software.
004:        OSI Certified is a certification mark of the Open Source Initiative.
005:
006:        The license (Mozilla version 1.0) can be read at the MMBase site.
007:        See http://www.MMBase.org/license
008:
009:         */
010:        package org.mmbase.storage.search;
011:
012:        import java.util.List;
013:        import org.mmbase.module.core.MMObjectBuilder;
014:
015:        /**
016:         * Defines methods for an object that handles search query requests.
017:         *
018:         * @author Rob van Maris
019:         * @version $Id: SearchQueryHandler.java,v 1.7 2007/11/06 17:12:38 michiel Exp $
020:         * @since MMBase-1.7
021:         */
022:        public interface SearchQueryHandler {
023:            /**
024:             * Support level for features that are not supported.
025:             */
026:            public final static int SUPPORT_NONE = 0;
027:
028:            /**
029:             * Support level for features that are supported, but not recommended when performance is  critical.
030:             */
031:            public final static int SUPPORT_WEAK = 1;
032:
033:            /**
034:             * Support level for features that are available for use under normal circumstances.
035:             */
036:            public final static int SUPPORT_NORMAL = 2;
037:
038:            /**
039:             * Support level for features that are optimally supported. This applies also to features that are supported without a significant impact on performance penalty.
040:             */
041:            public final static int SUPPORT_OPTIMAL = 3;
042:
043:            /**
044:             * Feature that allows specifying the maximum number of results to be returned.
045:             * @see SearchQuery#getMaxNumber
046:             */
047:            public final static int FEATURE_MAX_NUMBER = 1;
048:
049:            /**
050:             * Feature that allows specifying an index in the list of results, as a starting popublic final static int for results to be returned.
051:             * @see SearchQuery#getOffset
052:             */
053:            public final static int FEATURE_OFFSET = 2;
054:
055:            /**
056:             * Feature that allows to search on string by a regular expression.
057:             * @see SearchQuery#getOffset
058:             */
059:            public final static int FEATURE_REGEXP = 3;
060:
061:            /**
062:             * Gets the level at which a feature is supported for a query
063:             * by this handler. This is one of either:
064:             * <ul>
065:             * <li>{@link #SUPPORT_NONE SUPPORT_NONE}
066:             * <li>{@link #SUPPORT_WEAK SUPPORT_WEAK}
067:             * <li>{@link #SUPPORT_NORMAL SUPPORT_NORMAL}
068:             * <li>{@link #SUPPORT_OPTIMAL SUPPORT_OPTIMAL}
069:             * </ul>
070:             * Given the choice, the query handler with the highest level of support is prefered.
071:             */
072:            public int getSupportLevel(int feature, SearchQuery query)
073:                    throws SearchQueryException;
074:
075:            /**
076:             * Gets the level at which a constraint is supported for a query
077:             * by this handler. This is one of either:
078:             * <ul>
079:             * <li>{@link #SUPPORT_NONE SUPPORT_NONE}
080:             * <li>{@link #SUPPORT_WEAK SUPPORT_WEAK}
081:             * <li>{@link #SUPPORT_NORMAL SUPPORT_NORMAL}
082:             * <li>{@link #SUPPORT_OPTIMAL SUPPORT_OPTIMAL}
083:             * </ul>
084:             * Given the choice, the query handler with the highest level of support is prefered.
085:             */
086:            public int getSupportLevel(Constraint constraint, SearchQuery query)
087:                    throws SearchQueryException;
088:
089:            /**
090:             * Processes a search query, returns the result as a list of nodes.
091:             * Depending on the specified builder, the results will be:
092:             * <ul>
093:             * <li>Resultnodes, with fields named according to the field aliases
094:             * specified by the query.
095:             * <li>Clusternodes, with fields named
096:             * <code>&lt;step alias&gt;.&lt;field name&gt;</code>, where
097:             * the step alias is required to be of the form
098:             * <code>&lt;step tablename&gt;&lt;x&gt;</code>, and
099:             * <code>&lt;x&gt;</code> is either empty or a single digit. Examples: <br />
100:             * <code>images.number</code>, <code>images0.number</code>,
101:             * <code>images1.number</code>
102:             * <li>Real nodes, where all fields are required to be included in
103:             * the query.
104:             * </ul>
105:             * @param query The search query.
106:             * @param builder The builder for the result nodes. Specify a
107:             *        {@link ResultBuilder ResultBuilder}
108:             *        to get resultnodes.
109:             *        {@link org.mmbase.module.core.ClusterBuilder ClusterBuilder}
110:             *        to get clusternodes.
111:             * @return The resulting nodes.
112:             * @see ResultNode
113:             * @see org.mmbase.module.core.ClusterNode
114:             */
115:            public List<org.mmbase.module.core.MMObjectNode> getNodes(
116:                    SearchQuery query, MMObjectBuilder builder)
117:                    throws SearchQueryException;
118:
119:            /**
120:             * Makes a String of a query, taking into consideration if the database supports offset and
121:             * maxnumber features. The resulting String is an SQL query which can be fed to the database.
122:             * @param query the query to convert to sql
123:             * @return the sql string
124:             * @throws SearchQueryException when error occurs while making the string
125:             * @since MMBase-1.8.5
126:             */
127:            public String createSqlString(SearchQuery query)
128:                    throws SearchQueryException;
129:
130:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.