org.mmbase.storage.search.implementation
Class BasicFieldConstraint

java.lang.Object
  extended byorg.mmbase.storage.search.implementation.BasicConstraint
      extended byorg.mmbase.storage.search.implementation.BasicFieldConstraint
All Implemented Interfaces:
Constraint, FieldConstraint
Direct Known Subclasses:
BasicFieldCompareConstraint, BasicFieldNullConstraint, BasicFieldValueBetweenConstraint, BasicFieldValueInConstraint, BasicStringSearchConstraint

public class BasicFieldConstraint
extends BasicConstraint
implements FieldConstraint

Basic implementation. The caseSensitive property defaults to true.

Since:
MMBase-1.7
Version:
$Id: BasicFieldConstraint.java,v 1.5 2003/03/10 11:50:54 pierre Exp $
Author:
Rob van Maris

Constructor Summary
protected BasicFieldConstraint(StepField field)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares this constraint to the specified object.
 StepField getField()
          Gets the associated stepfield.
 int hashCode()
           
 boolean isCaseSensitive()
          Tests if a the string comparison is case sensitive.
 BasicFieldConstraint setCaseSensitive(boolean caseSensitive)
          Sets caseSensitive property.
 
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, toString, wait, wait, wait
 
Methods inherited from interface org.mmbase.storage.search.Constraint
getBasicSupportLevel, isInverse
 

Constructor Detail

BasicFieldConstraint

protected BasicFieldConstraint(StepField field)
Constructor. Protected, so only subclasses can be instantiated.

Parameters:
field - The associated field.
Throws:
java.lang.IllegalArgumentException - when an invalid argument is supplied.
Method Detail

setCaseSensitive

public BasicFieldConstraint setCaseSensitive(boolean caseSensitive)
Sets caseSensitive property. This has only effect when the associated field is of string type.

Parameters:
caseSensitive - The caseSensitive property value.
Returns:
This BasicFieldConstraint instance.

getField

public StepField getField()
Description copied from interface: FieldConstraint
Gets the associated stepfield.

Specified by:
getField in interface FieldConstraint

isCaseSensitive

public boolean isCaseSensitive()
Description copied from interface: FieldConstraint
Tests if a the string comparison is case sensitive. This property is ignored if the associated field is not of string type.

Specified by:
isCaseSensitive in interface FieldConstraint

equals

public boolean equals(java.lang.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 BasicConstraint

hashCode

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


MMBase build 1.7.1.20041002