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

java.lang.Object
  extended by org.apache.directory.server.xdbm.search.impl.PresenceEvaluator<ID>
All Implemented Interfaces:
Evaluator<org.apache.directory.shared.ldap.filter.PresenceNode,org.apache.directory.shared.ldap.entry.ServerEntry,ID>

public class PresenceEvaluator<ID>
extends java.lang.Object
implements Evaluator<org.apache.directory.shared.ldap.filter.PresenceNode,org.apache.directory.shared.ldap.entry.ServerEntry,ID>

An Evaluator which determines if candidates are matched by GreaterEqNode assertions.

Version:
$Rev$
Author:
Apache Directory Project

Constructor Summary
PresenceEvaluator(org.apache.directory.shared.ldap.filter.PresenceNode node, Store<org.apache.directory.shared.ldap.entry.ServerEntry,ID> db, org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
           
 
Method Summary
 boolean evaluate(IndexEntry<?,org.apache.directory.shared.ldap.entry.ServerEntry,ID> indexEntry)
          Evaluates a candidate to determine if a filter expression selects it.
 boolean evaluateEntry(org.apache.directory.shared.ldap.entry.ServerEntry entry)
          Evaluates whether or not a candidate, satisfies the expression associated with this Evaluator .
 boolean evaluateId(ID id)
          Evaluates whether or not a candidate, specified by an id, satisfies the expression associated with this Evaluator .
 org.apache.directory.shared.ldap.schema.AttributeType getAttributeType()
           
 org.apache.directory.shared.ldap.filter.PresenceNode 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

PresenceEvaluator

public PresenceEvaluator(org.apache.directory.shared.ldap.filter.PresenceNode node,
                         Store<org.apache.directory.shared.ldap.entry.ServerEntry,ID> db,
                         org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
                  throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getExpression

public org.apache.directory.shared.ldap.filter.PresenceNode getExpression()
Description copied from interface: Evaluator
Gets the expression used by this expression Evaluator.

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

getAttributeType

public org.apache.directory.shared.ldap.schema.AttributeType getAttributeType()

evaluate

public boolean evaluate(IndexEntry<?,org.apache.directory.shared.ldap.entry.ServerEntry,ID> indexEntry)
                 throws java.lang.Exception
Description copied from interface: Evaluator
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.filter.PresenceNode,org.apache.directory.shared.ldap.entry.ServerEntry,ID>
Parameters:
indexEntry - the index record of the entry to evaluate
Returns:
true if filter selects the candidate false otherwise
Throws:
java.lang.Exception - if there are faults during evaluation

evaluateId

public boolean evaluateId(ID id)
                   throws java.lang.Exception
Description copied from interface: Evaluator
Evaluates whether or not a candidate, specified by an id, satisfies the expression associated with this Evaluator .

Specified by:
evaluateId in interface Evaluator<org.apache.directory.shared.ldap.filter.PresenceNode,org.apache.directory.shared.ldap.entry.ServerEntry,ID>
Parameters:
id - the identifier for the candidate entry
Returns:
true if filter selects the candidate false otherwise
Throws:
java.lang.Exception - if there are faults during evaluation

evaluateEntry

public boolean evaluateEntry(org.apache.directory.shared.ldap.entry.ServerEntry entry)
                      throws java.lang.Exception
Description copied from interface: Evaluator
Evaluates whether or not a candidate, satisfies the expression associated with this Evaluator .

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


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