org.mmbase.storage.search.implementation
Class BasicFieldCompareConstraint
java.lang.Object
org.mmbase.storage.search.implementation.BasicConstraint
org.mmbase.storage.search.implementation.BasicFieldConstraint
org.mmbase.storage.search.implementation.BasicFieldCompareConstraint
- All Implemented Interfaces:
- Constraint, FieldCompareConstraint, FieldConstraint
- Direct Known Subclasses:
- BasicCompareFieldsConstraint, BasicFieldValueConstraint
- public class BasicFieldCompareConstraint
- extends BasicFieldConstraint
- implements FieldCompareConstraint
Basic implementation.
The tested operation is equality, unless it is explicitly set.
- Since:
- MMBase-1.7
- Version:
- $Id: BasicFieldCompareConstraint.java,v 1.5 2003/03/10 11:50:54 pierre Exp $
- Author:
- Rob van Maris
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
BasicFieldCompareConstraint
protected BasicFieldCompareConstraint(StepField field)
- Constructor.
Protected, so only subclasses can be instantiated.
- Parameters:
field - The associated field.
- Throws:
java.lang.IllegalArgumentException - when an invalid argument is supplied.
setOperator
public BasicFieldCompareConstraint setOperator(int operator)
- Sets operator.
- Returns:
- This
BasicFieldCompareConstraint instance.
- Throws:
java.lang.IllegalArgumentException - when an invalid argument is supplied.
getOperator
public int getOperator()
- Description copied from interface:
FieldCompareConstraint
- Gets the operator used to compare values.
This must be one of the values declared here.
The value
LIKE is allowed only when the associated field
is of string type.
- Specified by:
getOperator in interface FieldCompareConstraint
equals
public boolean equals(java.lang.Object obj)
- Description copied from interface:
Constraint
- Compares this constraint to the specified object. The result is
true if and only if the argument is a non-null
Constraint object representing the same constraint(s).
- Specified by:
equals in interface Constraint- Overrides:
equals in class BasicFieldConstraint
hashCode
public int hashCode()
- Specified by:
hashCode in interface Constraint- Overrides:
hashCode in class BasicFieldConstraint
MMBase build 1.7.1.20041002