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 constraint that compares a stepfield value with a fixed value.
14: * <p>
15: * This corresponds with comparison operators <, =, > and LIKE in SQL SELECT-syntax.
16: *
17: * @author Rob van Maris
18: * @version $Id: FieldValueConstraint.java,v 1.4 2003/11/26 14:11:57 robmaris Exp $
19: * @since MMBase-1.7
20: */
21: public interface FieldValueConstraint extends FieldCompareConstraint {
22: /**
23: * Gets the value to compare with.
24: * Depending on the field type, the value is of type
25: * <code>String</code> or <code>Number</code>.
26: * <p>
27: * If the associated field type is of string type, when used in
28: * combination with the operator <code>LIKE</code>, this may contain the
29: * following wildcard characters as well:
30: * <ul>
31: * <li>% for any string
32: * <li>_ for a single character
33: * </ul>
34: */
35: Object getValue();
36:
37: /**
38: * Returns a string representation of this FieldValueConstraint.
39: * The string representation has the form
40: * "FieldValueConstraint(inverse:<:inverse>, field:<field>,
41: * casesensitive:<casesensitive>, operator:<operator>,
42: * value:<value>)"
43: * where
44: * <ul>
45: * <li><em><inverse></em>is the value returned by
46: * {@link #isInverse isInverse()}
47: * <li><em><field></em> is the field alias returned by
48: * <code>FieldConstraint#getField().getAlias()</code>, or
49: * <code>FieldConstraint#getField().getFieldName()</code>
50: * when the former is <code>null</code>.
51: * <li><em><casesensitive></em> is the value returned by
52: * {@link FieldConstraint#isCaseSensitive isCaseSensitive()}
53: * <li><em><operator></em> is the value returned by
54: * (@link FieldCompareConstraint#getOperator getOperator()}
55: * <li><em><value></em> is the value returned by
56: * {@link #getValue getValue()}
57: * </ul>
58: *
59: * @return A string representation of this FieldValueConstraint.
60: */
61: public String toString();
62:
63: }
|