org.mmbase.storage.search.implementation
Class BasicCompareFieldsConstraint
java.lang.Object
org.mmbase.storage.search.implementation.BasicConstraint
org.mmbase.storage.search.implementation.BasicFieldConstraint
org.mmbase.storage.search.implementation.BasicFieldCompareConstraint
org.mmbase.storage.search.implementation.BasicCompareFieldsConstraint
- All Implemented Interfaces:
- CompareFieldsConstraint, Constraint, FieldCompareConstraint, FieldConstraint
- public class BasicCompareFieldsConstraint
- extends BasicFieldCompareConstraint
- implements CompareFieldsConstraint
Basic implementation.
The tested operation is equality, unless it is explicitly set.
- Since:
- MMBase-1.7
- Version:
- $Id: BasicCompareFieldsConstraint.java,v 1.4 2003/03/10 11:50:54 pierre Exp $
- Author:
- Rob van Maris
|
Method Summary |
boolean |
equals(java.lang.Object obj)
Compares this constraint to the specified object. |
StepField |
getField2()
Gets the second associated field. |
int |
hashCode()
|
java.lang.String |
toString()
Returns a string representation of this CompareFieldsConstraint. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
BasicCompareFieldsConstraint
public BasicCompareFieldsConstraint(StepField field1,
StepField field2)
- Constructor.
- Parameters:
field2 - The second associated field.
- Throws:
java.lang.IllegalArgumentException - when an invalid argument is supplied.
getField2
public StepField getField2()
- Description copied from interface:
CompareFieldsConstraint
- Gets the second associated field.
- Specified by:
getField2 in interface CompareFieldsConstraint
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 BasicFieldCompareConstraint
hashCode
public int hashCode()
- Specified by:
hashCode in interface Constraint- Overrides:
hashCode in class BasicFieldCompareConstraint
toString
public java.lang.String toString()
- Description copied from interface:
CompareFieldsConstraint
- Returns a string representation of this CompareFieldsConstraint.
The string representation has the form
"CompareFieldsConstraint(inverse:<:inverse>, field:<field>,
casesensitive:<casesensitive>, operator:<operator>,
field2:<field2>)"
where
- <inverse>is the value returned by
isInverse()
- <field> is the field alias returned by
FieldConstraint#getField().getAlias()
- <casesensitive> is the value returned by
isCaseSensitive()
- <operator> is the value returned by
getOperator()
- <field2> is the field alias returned by
#getField2().getAlias()
- Specified by:
toString in interface CompareFieldsConstraint
MMBase build 1.7.1.20041002