org.apache.jackrabbit.core.query.lucene.constraint
Class QueryConstraint
java.lang.Object
org.apache.jackrabbit.core.query.lucene.constraint.SelectorBasedConstraint
org.apache.jackrabbit.core.query.lucene.constraint.QueryConstraint
- All Implemented Interfaces:
- Constraint
- Direct Known Subclasses:
- FullTextConstraint, PropertyExistenceConstraint
public abstract class QueryConstraint
- extends SelectorBasedConstraint
QueryConstraint
implements a constraint that is based on a
lucene query.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QueryConstraint
public QueryConstraint(org.apache.lucene.search.Query constraint,
SelectorImpl selector,
LuceneQueryFactory factory)
- Creates a new query constraint using the given lucene query.
- Parameters:
constraint
- the lucene query constraint.selector
- the selector for this constraint.factory
- the lucene query factory.
evaluate
public boolean evaluate(ScoreNode[] row,
Name[] selectorNames,
EvaluationContext context)
throws IOException
- Evaluates this constraint for the given row.
- Parameters:
row
- the current row of score nodes.selectorNames
- the selector names associated with row
.context
- the evaluation context.
- Returns:
true
if the row satisfies the constraint,
false
otherwise.
- Throws:
IOException
- if an error occurs while evaluating the constraint.
Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.