org.apache.directory.server.core.partition.impl.btree
Interface SearchEngine

All Known Implementing Classes:
DefaultSearchEngine

public interface SearchEngine

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

Version:
$Rev: 434579 $
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
 boolean evaluate(org.apache.directory.shared.ldap.filter.ExprNode filter, java.math.BigInteger id)
          Evaluates a filter on an entry with a id.
 Optimizer getOptimizer()
          Gets the optimizer for this DefaultSearchEngine.
 javax.naming.NamingEnumeration search(javax.naming.Name base, java.util.Map env, org.apache.directory.shared.ldap.filter.ExprNode filter, javax.naming.directory.SearchControls searchCtls)
          Conducts a search on a database.
 

Field Detail

ALIASMODE_KEY

static final java.lang.String ALIASMODE_KEY
See Also:
Constant Field Values

ALWAYS

static final java.lang.String ALWAYS
See Also:
Constant Field Values

NEVER

static final java.lang.String NEVER
See Also:
Constant Field Values

FINDING

static final java.lang.String FINDING
See Also:
Constant Field Values

SEARCHING

static final java.lang.String SEARCHING
See Also:
Constant Field Values
Method Detail

getOptimizer

Optimizer getOptimizer()
Gets the optimizer for this DefaultSearchEngine.

Returns:
the optimizer

search

javax.naming.NamingEnumeration search(javax.naming.Name base,
                                      java.util.Map env,
                                      org.apache.directory.shared.ldap.filter.ExprNode filter,
                                      javax.naming.directory.SearchControls searchCtls)
                                      throws javax.naming.NamingException
Conducts a search on a database.

Parameters:
base - the search base
env - the environment for the search
filter - the search filter AST root
searchCtls - the JNDI search controls
Returns:
enumeration over SearchResults
Throws:
javax.naming.NamingException - if the search fails

evaluate

boolean evaluate(org.apache.directory.shared.ldap.filter.ExprNode filter,
                 java.math.BigInteger id)
                 throws javax.naming.NamingException
Evaluates a filter on an entry with a id.

Parameters:
filter - the filter root AST node
id - the id of the entry to test
Returns:
true if the filter passes the entry, false otherwise
Throws:
javax.naming.NamingException - if something goes wrong while accessing the db


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