| org.mmbase.storage.search.SearchQueryHandler
All known Subclasses: org.mmbase.storage.search.implementation.database.BasicQueryHandler,
SearchQueryHandler | public interface SearchQueryHandler (Code) | | Defines methods for an object that handles search query requests.
author: Rob van Maris version: $Id: SearchQueryHandler.java,v 1.7 2007/11/06 17:12:38 michiel Exp $ since: MMBase-1.7 |
Field Summary | |
final public static int | FEATURE_MAX_NUMBER Feature that allows specifying the maximum number of results to be returned. | final public static int | FEATURE_OFFSET Feature that allows specifying an index in the list of results, as a starting popublic final static int for results to be returned. | final public static int | FEATURE_REGEXP Feature that allows to search on string by a regular expression. | final public static int | SUPPORT_NONE Support level for features that are not supported. | final public static int | SUPPORT_NORMAL Support level for features that are available for use under normal circumstances. | final public static int | SUPPORT_OPTIMAL Support level for features that are optimally supported. | final public static int | SUPPORT_WEAK Support level for features that are supported, but not recommended when performance is critical. |
Method Summary | |
public String | createSqlString(SearchQuery query) Makes a String of a query, taking into consideration if the database supports offset and
maxnumber features. | public List<org.mmbase.module.core.MMObjectNode> | getNodes(SearchQuery query, MMObjectBuilder builder) Processes a search query, returns the result as a list of nodes.
Depending on the specified builder, the results will be:
- Resultnodes, with fields named according to the field aliases
specified by the query.
- Clusternodes, with fields named
<step alias>.<field name> , where
the step alias is required to be of the form
<step tablename><x> , and
<x> is either empty or a single digit. | public int | getSupportLevel(int feature, SearchQuery query) Gets the level at which a feature is supported for a query
by this handler. | public int | getSupportLevel(Constraint constraint, SearchQuery query) Gets the level at which a constraint is supported for a query
by this handler. |
FEATURE_MAX_NUMBER | final public static int FEATURE_MAX_NUMBER(Code) | | Feature that allows specifying the maximum number of results to be returned.
See Also: SearchQuery.getMaxNumber |
FEATURE_OFFSET | final public static int FEATURE_OFFSET(Code) | | Feature that allows specifying an index in the list of results, as a starting popublic final static int for results to be returned.
See Also: SearchQuery.getOffset |
FEATURE_REGEXP | final public static int FEATURE_REGEXP(Code) | | Feature that allows to search on string by a regular expression.
See Also: SearchQuery.getOffset |
SUPPORT_NONE | final public static int SUPPORT_NONE(Code) | | Support level for features that are not supported.
|
SUPPORT_NORMAL | final public static int SUPPORT_NORMAL(Code) | | Support level for features that are available for use under normal circumstances.
|
SUPPORT_OPTIMAL | final public static int SUPPORT_OPTIMAL(Code) | | Support level for features that are optimally supported. This applies also to features that are supported without a significant impact on performance penalty.
|
SUPPORT_WEAK | final public static int SUPPORT_WEAK(Code) | | Support level for features that are supported, but not recommended when performance is critical.
|
createSqlString | public String createSqlString(SearchQuery query) throws SearchQueryException(Code) | | Makes a String of a query, taking into consideration if the database supports offset and
maxnumber features. The resulting String is an SQL query which can be fed to the database.
Parameters: query - the query to convert to sql the sql string throws: SearchQueryException - when error occurs while making the string since: MMBase-1.8.5 |
getNodes | public List<org.mmbase.module.core.MMObjectNode> getNodes(SearchQuery query, MMObjectBuilder builder) throws SearchQueryException(Code) | | Processes a search query, returns the result as a list of nodes.
Depending on the specified builder, the results will be:
- Resultnodes, with fields named according to the field aliases
specified by the query.
- Clusternodes, with fields named
<step alias>.<field name> , where
the step alias is required to be of the form
<step tablename><x> , and
<x> is either empty or a single digit. Examples:
images.number , images0.number ,
images1.number
- Real nodes, where all fields are required to be included in
the query.
Parameters: query - The search query. Parameters: builder - The builder for the result nodes. Specify aResultBuilder ResultBuilderto get resultnodes.org.mmbase.module.core.ClusterBuilder ClusterBuilderto get clusternodes. The resulting nodes. See Also: ResultNode See Also: org.mmbase.module.core.ClusterNode |
getSupportLevel | public int getSupportLevel(int feature, SearchQuery query) throws SearchQueryException(Code) | | Gets the level at which a feature is supported for a query
by this handler. This is one of either:
Given the choice, the query handler with the highest level of support is prefered.
|
getSupportLevel | public int getSupportLevel(Constraint constraint, SearchQuery query) throws SearchQueryException(Code) | | Gets the level at which a constraint is supported for a query
by this handler. This is one of either:
Given the choice, the query handler with the highest level of support is prefered.
|
|
|