org.mmbase.storage.search.implementation
Class BasicLegacyConstraint

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

public class BasicLegacyConstraint
extends BasicConstraint
implements LegacyConstraint, Serializable

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 41982 2010-04-20 14:05:14Z michiel $
Author:
Rob van Maris
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mmbase.storage.search.implementation.BasicConstraint
modifiable
 
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, setUnmodifiable
 
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, setUnmodifiable
 

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
Parameters:
obj - The object to compare with.
Returns:
true if the objects are equal, false otherwise.

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
Overrides:
toString in class Object
Returns:
A string representation of this LegacyConstraint.


MMBase 2.0-SNAPSHOT - null