org.mmbase.storage.search
Interface SearchQueryHandler

All Known Subinterfaces:
DatabaseStorage, MMJdbc2NodeInterface, Storage
All Known Implementing Classes:
AbstractDatabaseStorage, BaseJdbc2Node, BasicQueryHandler, JDBC2NodeWrapper, MMInformix42Node, MMMckoiNode, MMMysql42Node, MMOORel2Node, MMOracle, MMPostgres42Node, MMSQL92Node, OODatabaseStorage, PostgreSQL, PostgreSqlStorage, RelationalDatabaseStorage, SQL92DatabaseStorage, Sql92SingleFields, Sql92WithViews, Support2Storage

public interface SearchQueryHandler

Defines methods for an object that handles search query requests.

Since:
MMBase-1.7
Version:
$Id: SearchQueryHandler.java,v 1.3 2003/03/10 11:50:51 pierre Exp $
Author:
Rob van Maris

Field Summary
static int FEATURE_MAX_NUMBER
          Feature that allows specifying the maximum number of results to be returned.
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.
static int SUPPORT_NONE
          Support level for features that are not supported.
static int SUPPORT_NORMAL
          Support level for features that are available for use under normal circumstances.
static int SUPPORT_OPTIMAL
          Support level for features that are optimally supported.
static int SUPPORT_WEAK
          Support level for features that are supported, but not recommended when performance is critical.
 
Method Summary
 java.util.List getNodes(SearchQuery query, MMObjectBuilder builder)
          Processes a search query, returns the result as a list of nodes.
 int getSupportLevel(Constraint constraint, SearchQuery query)
          Gets the level at which a constraint is supported for a query by this handler.
 int getSupportLevel(int feature, SearchQuery query)
          Gets the level at which a feature is supported for a query by this handler.
 

Field Detail

SUPPORT_NONE

public static final int SUPPORT_NONE
Support level for features that are not supported.

See Also:
Constant Field Values

SUPPORT_WEAK

public static final int SUPPORT_WEAK
Support level for features that are supported, but not recommended when performance is critical.

See Also:
Constant Field Values

SUPPORT_NORMAL

public static final int SUPPORT_NORMAL
Support level for features that are available for use under normal circumstances.

See Also:
Constant Field Values

SUPPORT_OPTIMAL

public static final int SUPPORT_OPTIMAL
Support level for features that are optimally supported. This applies also to features that are supported without a significant impact on performance penalty.

See Also:
Constant Field Values

FEATURE_MAX_NUMBER

public static final int FEATURE_MAX_NUMBER
Feature that allows specifying the maximum number of results to be returned.

See Also:
SearchQuery.getMaxNumber(), Constant Field Values

FEATURE_OFFSET

public static final 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.

See Also:
SearchQuery.getOffset(), Constant Field Values
Method Detail

getSupportLevel

public int getSupportLevel(int feature,
                           SearchQuery query)
                    throws SearchQueryException
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.

Throws:
SearchQueryException

getSupportLevel

public int getSupportLevel(Constraint constraint,
                           SearchQuery query)
                    throws SearchQueryException
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.

Throws:
SearchQueryException

getNodes

public java.util.List getNodes(SearchQuery query,
                               MMObjectBuilder builder)
                        throws SearchQueryException
Processes a search query, returns the result as a list of nodes. Depending on the specified builder, the results will be:

Parameters:
query - The search query.
builder - The builder for the result nodes. Specify a ResultBuilder to get resultnodes. ClusterBuilder to get clusternodes.
Returns:
The resulting nodes.
Throws:
SearchQueryException
See Also:
ResultNode, ClusterNode


MMBase build 1.7.1.20041002