org.mmbase.storage.search.implementation
Class BasicLegacyConstraint

java.lang.Object
  extended byorg.mmbase.storage.search.implementation.BasicConstraint
      extended byorg.mmbase.storage.search.implementation.BasicLegacyConstraint
All Implemented Interfaces:
Constraint, LegacyConstraint

public class BasicLegacyConstraint
extends BasicConstraint
implements LegacyConstraint

Basic implementation.

This constraint type is provided for the sole purpose of aligning existing legacy code with the new search query framework, and will eventually be phased out.

Since:
MMBase-1.7
Version:
$Id: BasicLegacyConstraint.java,v 1.7 2005/05/02 13:03:30 michiel Exp $
Author:
Rob van Maris

Constructor Summary
BasicLegacyConstraint(String constraint)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
          Compares this constraint to the specified object.
 String getConstraint()
          Gets the constraint.
 int hashCode()
           
 BasicLegacyConstraint setConstraint(String constraint)
          Sets the constraint.
 String toString()
          Returns a string representation of this LegacyConstraint.
 
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.Constraint
getBasicSupportLevel, isInverse
 

Constructor Detail

BasicLegacyConstraint

public BasicLegacyConstraint(String constraint)
Constructor.

Parameters:
constraint - The non-null constraint as it appears in the where-clause.
Throws:
IllegalArgumentException - When an invalid argument is supplied.
Method Detail

setConstraint

public BasicLegacyConstraint setConstraint(String constraint)
Sets the constraint.

Parameters:
constraint - The non-null constraint as it appears in the where-clause (may also not be empty string)
Returns:
This BasicLegacyConstraint instance.
Throws:
IllegalArgumentException - When an invalid argument is supplied.

getConstraint

public String getConstraint()
Description copied from interface: LegacyConstraint
Gets the constraint.

Specified by:
getConstraint in interface LegacyConstraint
Returns:
The constraint as it appears in the where-clause.

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 BasicConstraint

hashCode

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

toString

public String toString()
Description copied from interface: LegacyConstraint
Returns a string representation of this LegacyConstraint. The string representation has the form "LegacyConstraint(inverse:<:inverse>, field:<field>, constraint:<constraint>)" where

Specified by:
toString in interface LegacyConstraint


MMBase build 1.8.1.20060716