01: /*
02:
03: This software is OSI Certified Open Source Software.
04: OSI Certified is a certification mark of the Open Source Initiative.
05:
06: The license (Mozilla version 1.0) can be read at the MMBase site.
07: See http://www.MMBase.org/license
08:
09: */
10: package org.mmbase.storage.search;
11:
12: /**
13: * A constaint on the search results.
14: * <p>
15: * This corresponds to constraints in a WHERE-clause in SQL SELECT-syntax.
16: *
17: * @author Rob van Maris
18: * @version $Id: Constraint.java,v 1.3 2007/12/06 08:13:36 michiel Exp $
19: * @since MMBase-1.7
20: */
21: public interface Constraint {
22: /**
23: * Tests if the condition must be inverted.
24: * <p>
25: * This corresponds to the use of NOT in a WHERE-clause in SQL SELECT-syntax.
26: */
27: boolean isInverse();
28:
29: /**
30: * Tests if this constraint is supported by the basic queryhandler.
31: */
32: int getBasicSupportLevel();
33:
34: /**
35: * Compares this constraint to the specified object. The result is
36: * <code>true</code> if and only if the argument is a non-null
37: * Constraint object representing the same constraint(s).
38: *
39: * @param obj The object to compare with.
40: * @return <code>true</code> if the objects are equal,
41: * <code>false</code> otherwise.
42: */
43: public boolean equals(Object obj);
44:
45: // javadoc is inherited
46: public int hashCode();
47:
48: }
|