org.apache.jackrabbit.core.query.lucene.constraint
Class LikeConstraint
java.lang.Object
org.apache.jackrabbit.core.query.lucene.constraint.SelectorBasedConstraint
org.apache.jackrabbit.core.query.lucene.constraint.ComparisonConstraint
org.apache.jackrabbit.core.query.lucene.constraint.LikeConstraint
- All Implemented Interfaces:
- Constraint, QueryObjectModelConstants
public class LikeConstraint
- extends ComparisonConstraint
LikeConstraint implements a like constraint.
| Fields inherited from interface org.apache.jackrabbit.spi.commons.query.jsr283.qom.QueryObjectModelConstants |
JOIN_TYPE_INNER, JOIN_TYPE_LEFT_OUTER, JOIN_TYPE_RIGHT_OUTER, OPERATOR_EQUAL_TO, OPERATOR_GREATER_THAN, OPERATOR_GREATER_THAN_OR_EQUAL_TO, OPERATOR_LESS_THAN, OPERATOR_LESS_THAN_OR_EQUAL_TO, OPERATOR_LIKE, OPERATOR_NOT_EQUAL_TO, ORDER_ASCENDING, ORDER_DESCENDING |
|
Method Summary |
protected boolean |
evaluate(Value op1)
Evaluates this constraint for the given dynamic operand value
op1. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LikeConstraint
public LikeConstraint(DynamicOperand operand1,
Value operand2,
SelectorImpl selector)
throws RepositoryException
- Creates a new like constraint.
- Parameters:
operand1 - the dynamic operand.operand2 - the static operand.selector - the selector for the dynamic operand.
- Throws:
RepositoryException - if an error occurs reading the string value
from the static operand.
evaluate
protected boolean evaluate(Value op1)
throws RepositoryException
- Evaluates this constraint for the given dynamic operand value
op1.
- Overrides:
evaluate in class ComparisonConstraint
- Parameters:
op1 - the current value of the dynamic operand.
- Returns:
true if the given value satisfies the constraint.
- Throws:
RepositoryException - if an error occurs while converting the
values.
Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.