org.apache.directory.server.xdbm.search
Interface SearchEngine<E>

All Known Implementing Classes:
DefaultSearchEngine

public interface SearchEngine<E>

Given a search filter and a scope the search engine identifies valid candidate entries returning their ids.

Version:
$Rev: 658798 $
Author:
Apache Directory Project

Field Summary
static java.lang.String ALIASMODE_KEY
           
static java.lang.String ALWAYS
           
static java.lang.String FINDING
           
static java.lang.String NEVER
           
static java.lang.String SEARCHING
           
 
Method Summary
 IndexCursor<java.lang.Long,E> cursor(org.apache.directory.shared.ldap.name.LdapDN base, org.apache.directory.shared.ldap.message.AliasDerefMode aliasDerefMode, org.apache.directory.shared.ldap.filter.ExprNode filter, javax.naming.directory.SearchControls searchCtls)
          Conducts a search on a database.
 Evaluator<? extends org.apache.directory.shared.ldap.filter.ExprNode,ServerEntry> evaluator(org.apache.directory.shared.ldap.filter.ExprNode filter)
          Builds an Evaluator for a filter expression.
 Optimizer getOptimizer()
          Gets the optimizer for this DefaultSearchEngine.
 

Field Detail

ALIASMODE_KEY

static final java.lang.String ALIASMODE_KEY
See Also:
Constant Field Values
'TODO'
put this in the right place The alias dereferencing mode key for JNDI providers

ALWAYS

static final java.lang.String ALWAYS
See Also:
Constant Field Values
'TODO'
put this in the right place The alias dereferencing mode value for JNDI providers

NEVER

static final java.lang.String NEVER
See Also:
Constant Field Values
'TODO'
put this in the right place The alias dereferencing mode value for JNDI providers

FINDING

static final java.lang.String FINDING
See Also:
Constant Field Values
'TODO'
put this in the right place The alias dereferencing mode value for JNDI providers

SEARCHING

static final java.lang.String SEARCHING
See Also:
Constant Field Values
'TODO'
put this in the right place The alias dereferencing mode value for JNDI providers
Method Detail

getOptimizer

Optimizer getOptimizer()
Gets the optimizer for this DefaultSearchEngine.

Returns:
the optimizer

cursor

IndexCursor<java.lang.Long,E> cursor(org.apache.directory.shared.ldap.name.LdapDN base,
                                     org.apache.directory.shared.ldap.message.AliasDerefMode aliasDerefMode,
                                     org.apache.directory.shared.ldap.filter.ExprNode filter,
                                     javax.naming.directory.SearchControls searchCtls)
                                     throws java.lang.Exception
Conducts a search on a database.

Parameters:
base - the search base
aliasDerefMode - the alias dereferencing mode to use
filter - the search filter AST root
searchCtls - the JNDI search controls
Returns:
enumeration over SearchResults
Throws:
java.lang.Exception - if the search fails

evaluator

Evaluator<? extends org.apache.directory.shared.ldap.filter.ExprNode,ServerEntry> evaluator(org.apache.directory.shared.ldap.filter.ExprNode filter)
                                                                                            throws java.lang.Exception
Builds an Evaluator for a filter expression.

Parameters:
filter - the filter root AST node
Returns:
true if the filter passes the entry, false otherwise
Throws:
java.lang.Exception - if something goes wrong while accessing the db


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.