org.apache.directory.server.xdbm.search.impl
Class AndEvaluator<ID>

java.lang.Object
  extended by org.apache.directory.server.xdbm.search.impl.AndEvaluator<ID>
All Implemented Interfaces:
Evaluator<org.apache.directory.shared.ldap.model.filter.AndNode,org.apache.directory.shared.ldap.model.entry.Entry,ID>

public class AndEvaluator<ID>
extends Object
implements Evaluator<org.apache.directory.shared.ldap.model.filter.AndNode,org.apache.directory.shared.ldap.model.entry.Entry,ID>

An Evaluator for logical conjunction (AND) expressions.

Author:
Apache Directory Project

Constructor Summary
AndEvaluator(org.apache.directory.shared.ldap.model.filter.AndNode node, List<Evaluator<? extends org.apache.directory.shared.ldap.model.filter.ExprNode,org.apache.directory.shared.ldap.model.entry.Entry,ID>> evaluators)
          Creates an instance of AndEvaluator
 
Method Summary
 boolean evaluate(IndexEntry<?,ID> indexEntry)
          Evaluates a candidate to determine if a filter expression selects it.
 boolean evaluateEntry(org.apache.directory.shared.ldap.model.entry.Entry entry)
          Evaluates whether or not a candidate, satisfies the expression associated with this Evaluator .
 org.apache.directory.shared.ldap.model.filter.AndNode getExpression()
          Gets the expression used by this expression Evaluator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AndEvaluator

public AndEvaluator(org.apache.directory.shared.ldap.model.filter.AndNode node,
                    List<Evaluator<? extends org.apache.directory.shared.ldap.model.filter.ExprNode,org.apache.directory.shared.ldap.model.entry.Entry,ID>> evaluators)
Creates an instance of AndEvaluator

Parameters:
node - The And Node
evaluators - The list of evaluators for all the contaned nodes
Method Detail

evaluateEntry

public boolean evaluateEntry(org.apache.directory.shared.ldap.model.entry.Entry entry)
                      throws Exception
Evaluates whether or not a candidate, satisfies the expression associated with this Evaluator .

Specified by:
evaluateEntry in interface Evaluator<org.apache.directory.shared.ldap.model.filter.AndNode,org.apache.directory.shared.ldap.model.entry.Entry,ID>
Parameters:
entry - the candidate entry
Returns:
true if filter selects the candidate false otherwise
Throws:
Exception - if there are faults during evaluation

evaluate

public boolean evaluate(IndexEntry<?,ID> indexEntry)
                 throws Exception
Evaluates a candidate to determine if a filter expression selects it. If an IndexEntry does has a null reference to the entry object, this Evaluator may set it if it has to access the full entry within the master table of the store. Subsequent evaluations on the IndexEntry then need not access the store to retreive the entry if they need to access it's attributes.

Specified by:
evaluate in interface Evaluator<org.apache.directory.shared.ldap.model.filter.AndNode,org.apache.directory.shared.ldap.model.entry.Entry,ID>
Parameters:
indexEntry - the index record of the entry to evaluate
Returns:
true if filter selects the candidate false otherwise
Throws:
Exception - if there are faults during evaluation

getExpression

public org.apache.directory.shared.ldap.model.filter.AndNode getExpression()
Gets the expression used by this expression Evaluator.

Specified by:
getExpression in interface Evaluator<org.apache.directory.shared.ldap.model.filter.AndNode,org.apache.directory.shared.ldap.model.entry.Entry,ID>
Returns:
the AST for the expression


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.