|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Evaluator<N extends org.apache.directory.shared.ldap.filter.ExprNode,E>
Evaluates candidate entries to see if they match a filter expression. Evaluators contain various overloads to the evaluate method. Often a developer working in this region of the code may wonder when to use one override verses another. The overload taking an IndexEntry argument is specifically suited for use when there is the possibility of multiple entry lookups from the master table. If the same candidate in the form of an IndexEntry is evaluated more then this overload is more efficient since it stores the looked up entry in the IndexEntry preventing multiple lookups. If the index entry is already populated with an entry object, and some evaluation is required then it is preferrable to use the overload that takes a Long id instead. Likewise if it is known in advance that the expression is a leaf node built on an indexed attribute then the overload with the Long id argument is also preferrable unless an IndexEntry already exists in which case it makes no difference. The overload taking the ServerEntry itself is a last resort option and ok to use when it is known that no index exists for the attributes of Evaluators based on leaf expressions.
Method Summary | |
---|---|
boolean |
evaluate(E entry)
Evaluates whether or not a candidate, satisfies the expression associated with this Evaluator . |
boolean |
evaluate(IndexEntry<?,E> entry)
Evaluates a candidate to determine if a filter expression selects it. |
boolean |
evaluate(java.lang.Long id)
Evaluates whether or not a candidate, specified by an id, satisfies the expression associated with this Evaluator . |
N |
getExpression()
Gets the expression used by this expression Evaluator. |
Method Detail |
---|
boolean evaluate(IndexEntry<?,E> entry) throws java.lang.Exception
entry
- the index record of the entry to evaluate
java.lang.Exception
- if there are faults during evaluationboolean evaluate(java.lang.Long id) throws java.lang.Exception
id
- the identifier for the candidate entry
java.lang.Exception
- if there are faults during evaluationboolean evaluate(E entry) throws java.lang.Exception
entry
- the candidate entry
java.lang.Exception
- if there are faults during evaluationN getExpression()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |