org.mmbase.storage.search
Interface FieldValueConstraint

Package class diagram package FieldValueConstraint
All Superinterfaces:
Constraint, FieldCompareConstraint, FieldConstraint
All Known Subinterfaces:
FieldValueDateConstraint
All Known Implementing Classes:
BasicFieldValueConstraint, BasicFieldValueDateConstraint, BasicFunctionValueConstraint

public interface FieldValueConstraint
extends FieldCompareConstraint

A constraint that compares a stepfield value with a fixed value.

This corresponds with comparison operators <, =, > and LIKE in SQL SELECT-syntax.

Since:
MMBase-1.7
Version:
$Id: FieldValueConstraint.java 42627 2010-06-21 09:54:05Z michiel $
Author:
Rob van Maris

Field Summary
 
Fields inherited from interface org.mmbase.storage.search.FieldCompareConstraint
EQUAL, GREATER, GREATER_EQUAL, LESS, LESS_EQUAL, LIKE, NOT_EQUAL, OPERATOR_DESCRIPTIONS, REGEXP
 
Method Summary
 Object getValue()
          Gets the value to compare with.
 boolean matches(Object value)
          Determines whether a certain given value would match this constraint.
 String toString()
          Returns a string representation of this FieldValueConstraint.
 
Methods inherited from interface org.mmbase.storage.search.FieldCompareConstraint
getOperator
 
Methods inherited from interface org.mmbase.storage.search.FieldConstraint
getField, isCaseSensitive
 
Methods inherited from interface org.mmbase.storage.search.Constraint
equals, getBasicSupportLevel, hashCode, isInverse, setUnmodifiable
 

Method Detail

getValue

Object getValue()
Gets the value to compare with. Depending on the field type, the value is of type String or Number.

If the associated field type is of string type, when used in combination with the operator LIKE, this may contain the following wildcard characters as well:


toString

String toString()
Returns a string representation of this FieldValueConstraint. The string representation has the form "FieldValueConstraint(inverse:<:inverse>, field:<field>, casesensitive:<casesensitive>, operator:<operator>, value:<value>)" where

Overrides:
toString in class Object
Returns:
A string representation of this FieldValueConstraint.

matches

boolean matches(Object value)
Description copied from interface: FieldConstraint
Determines whether a certain given value would match this constraint.

Specified by:
matches in interface FieldConstraint
Since:
MMBase-1.9.4


MMBase2 Bridge 2.0-SNAPSHOT - 2013-05-29T22:05