org.mmbase.storage.search
Interface CompositeConstraint

All Superinterfaces:
Constraint
All Known Implementing Classes:
BasicCompositeConstraint

public interface CompositeConstraint
extends Constraint

A constraint combining several child constraints, using either logical AND or OR.

This corresponds to a AND- or OR-expression in SQL SELECT-syntax.

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

Field Summary
static int LOGICAL_AND
           
static int LOGICAL_OR
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares this constraint to the specified object.
 java.util.List getChilds()
          Gets the child constraints.
 int getLogicalOperator()
          Gets the logical operator used to combine the child constraints.
 int hashCode()
           
 java.lang.String toString()
          Returns a string representation of this CompositeConstraint.
 
Methods inherited from interface org.mmbase.storage.search.Constraint
getBasicSupportLevel, isInverse
 

Field Detail

LOGICAL_AND

public static final int LOGICAL_AND
See Also:
Constant Field Values

LOGICAL_OR

public static final int LOGICAL_OR
See Also:
Constant Field Values
Method Detail

getChilds

public java.util.List getChilds()
Gets the child constraints.


getLogicalOperator

public int getLogicalOperator()
Gets the logical operator used to combine the child constraints. This must be either LOGICAL_AND or LOGICAL_OR.


equals

public boolean equals(java.lang.Object obj)
Compares this constraint to the specified object. The result is true if and only if the argument is a non-null CompositeConstraint object representing the same constraint(s).

Specified by:
equals in interface Constraint
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

toString

public java.lang.String toString()
Returns a string representation of this CompositeConstraint. The string representation has the form "CompositeConstraint(inverse:<:inverse>, operator:<operator>, childs:<childs>)" where

Returns:
A string representation of this CompositeConstraint.


MMBase build 1.7.1.20041002