org.mmbase.storage.search.implementation
Class BasicFieldValueBetweenConstraint

java.lang.Object
  extended byorg.mmbase.storage.search.implementation.BasicConstraint
      extended byorg.mmbase.storage.search.implementation.BasicFieldConstraint
          extended byorg.mmbase.storage.search.implementation.BasicFieldValueBetweenConstraint
All Implemented Interfaces:
Constraint, FieldConstraint, FieldValueBetweenConstraint

public class BasicFieldValueBetweenConstraint
extends BasicFieldConstraint
implements FieldValueBetweenConstraint

Basic implementation.

Since:
MMBase-1.7
Version:
$Id: BasicFieldValueBetweenConstraint.java,v 1.8 2005/04/25 14:56:57 pierre Exp $
Author:
Rob van Maris

Constructor Summary
BasicFieldValueBetweenConstraint(StepField field, Object lowerLimit, Object upperLimit)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
          Compares this constraint to the specified object.
 Object getLowerLimit()
          Gets the value of the lower limit of the range specified for this constraint.
 Object getUpperLimit()
          Gets the value of the upper limit of the range specified for this constraint.
 int hashCode()
           
 BasicFieldValueBetweenConstraint setLowerLimit(Object lowerLimit)
          Sets the lower limit property.
 BasicFieldValueBetweenConstraint setUpperLimit(Object upperLimit)
          Sets the upper limit property.
 String toString()
          Returns a string representation of this FieldValueBetweenConstraint.
 
Methods inherited from class org.mmbase.storage.search.implementation.BasicFieldConstraint
getField, getFieldName, isCaseSensitive, setCaseSensitive
 
Methods inherited from class org.mmbase.storage.search.implementation.BasicConstraint
getBasicSupportLevel, isInverse, setInverse
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mmbase.storage.search.FieldConstraint
getField, isCaseSensitive
 
Methods inherited from interface org.mmbase.storage.search.Constraint
getBasicSupportLevel, isInverse
 

Constructor Detail

BasicFieldValueBetweenConstraint

public BasicFieldValueBetweenConstraint(StepField field,
                                        Object lowerLimit,
                                        Object upperLimit)
Constructor.

Depending on the field type, the limit values must be of type String or Number.

Parameters:
field - The associated field.
lowerLimit - The lower limit.
upperLimit - The upper limit.
Throws:
IllegalArgumentException - when an invalid argument is supplied.
Method Detail

setLowerLimit

public BasicFieldValueBetweenConstraint setLowerLimit(Object lowerLimit)
Sets the lower limit property.

Depending on the field type, the value must be of type String or Number.

Parameters:
lowerLimit - The non-null lower limit property value.
Returns:
This BasicFieldValueBetweenConstraint instance.
Throws:
IllegalArgumentException - when an invalid argument is supplied.

setUpperLimit

public BasicFieldValueBetweenConstraint setUpperLimit(Object upperLimit)
Sets the upper limit property.

Depending on the field type, the value must be of type String or Number.

Parameters:
upperLimit - The non-null upper limit property value.
Returns:
This BasicFieldValueBetweenConstraint instance.
Throws:
IllegalArgumentException - when an invalid argument is supplied.

getLowerLimit

public Object getLowerLimit()
Description copied from interface: FieldValueBetweenConstraint
Gets the value of the lower limit of the range specified for this constraint.

Specified by:
getLowerLimit in interface FieldValueBetweenConstraint

getUpperLimit

public Object getUpperLimit()
Description copied from interface: FieldValueBetweenConstraint
Gets the value of the upper limit of the range specified for this constraint.

Specified by:
getUpperLimit in interface FieldValueBetweenConstraint

equals

public boolean equals(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 BasicFieldConstraint

hashCode

public int hashCode()
Specified by:
hashCode in interface Constraint
Overrides:
hashCode in class BasicFieldConstraint

toString

public String toString()
Description copied from interface: FieldValueBetweenConstraint
Returns a string representation of this FieldValueBetweenConstraint. The string representation has the form "FieldValueBetweenConstraint(inverse:<:inverse>, field:<field>, casesensitive:<casesensitive>, lower:<lowerLimit>, upper:<upperLimit>)" where

Specified by:
toString in interface FieldValueBetweenConstraint
Overrides:
toString in class BasicFieldConstraint


MMBase build 1.8.1.20060716