KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > storage > search > FieldValueConstraint


1 /*
2
3 This software is OSI Certified Open Source Software.
4 OSI Certified is a certification mark of the Open Source Initiative.
5
6 The license (Mozilla version 1.0) can be read at the MMBase site.
7 See http://www.MMBase.org/license
8
9 */

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 JavaDoc getValue();
36
37     /**
38      * Returns a string representation of this FieldValueConstraint.
39      * The string representation has the form
40      * "FieldValueConstraint(inverse:&lt:inverse&gt;, field:&lt;field&gt;,
41      * casesensitive:&lt;casesensitive&gt;, operator:&lt;operator&gt;,
42      * value:&lt;value&gt;)"
43      * where
44      * <ul>
45      * <li><em>&lt;inverse&gt;</em>is the value returned by
46      * {@link #isInverse isInverse()}
47      * <li><em>&lt;field&gt;</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>&lt;casesensitive&gt;</em> is the value returned by
52      * {@link FieldConstraint#isCaseSensitive isCaseSensitive()}
53      * <li><em>&lt;operator&gt;</em> is the value returned by
54      * (@link FieldCompareConstraint#getOperator getOperator()}
55      * <li><em>&lt;value&gt;</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 JavaDoc toString();
62
63 }
64
Popular Tags