org.odbms
Interface Constraint

All Known Implementing Classes:
ConstraintImpl

public interface Constraint

constraint for a single query node.

A Constraint is associated with one single Query node - a single member of a class.

Constraints are constructed by calling Query.constrain().

Constraints can be joined with the methods and() and or().

The following mutual exclusive functions set the evaluation mode. The subsequent call prevails:
identity(), equal(), greater(), greaterOrEqual(), smaller(), smallerOrEqual(), like(), contains()

is(), and not() are also mutually exclusive.


Method Summary
 Constraint and(Constraint andWith)
          links two Constraints for AND evaluation
 Constraint contains()
          sets the evaluation mode to containment comparison
 Constraint equal()
          sets the evaluation mode to "=="
 Constraint greater()
          sets the evaluation mode to ">"
 Constraint greaterOrEqual()
          sets the evaluation mode to ">="
 Constraint identity()
          sets the evaluation mode to identity comparison
 Constraint is()
          turns off not() comparison
 Constraint like()
          sets the evaluation mode to "like" comparison
 Constraint not()
          turns on not() comparison
 Constraint or(Constraint orWith)
          links two Constraints for OR evaluation
 Constraint smaller()
          sets the evaluation mode to "<"
 Constraint smallerOrEqual()
          sets the evaluation mode to "<="
 

Method Detail

and

public Constraint and(Constraint andWith)
links two Constraints for AND evaluation

Parameters:
andWith - the other Constraint
Returns:
a new Constraint, that can be used for further calls to and() and or()

or

public Constraint or(Constraint orWith)
links two Constraints for OR evaluation

Parameters:
orWith - the other Constraint
Returns:
a new Constraint, that can be used for further calls to and() and or()

equal

public Constraint equal()
sets the evaluation mode to "=="

Returns:
this Constraint to allow the chaining of method calls

greater

public Constraint greater()
sets the evaluation mode to ">"

Returns:
this Constraint to allow the chaining of method calls

greaterOrEqual

public Constraint greaterOrEqual()
sets the evaluation mode to ">="

Returns:
this Constraint to allow the chaining of method calls

smaller

public Constraint smaller()
sets the evaluation mode to "<"

Returns:
this Constraint to allow the chaining of method calls

smallerOrEqual

public Constraint smallerOrEqual()
sets the evaluation mode to "<="

Returns:
this Constraint to allow the chaining of method calls

identity

public Constraint identity()
sets the evaluation mode to identity comparison

Returns:
this Constraint to allow the chaining of method calls

like

public Constraint like()
sets the evaluation mode to "like" comparison

Returns:
this Constraint to allow the chaining of method calls

contains

public Constraint contains()
sets the evaluation mode to containment comparison

Returns:
this Constraint to allow the chaining of method calls

is

public Constraint is()
turns off not() comparison

Returns:
this Constraint to allow the chaining of method calls

not

public Constraint not()
turns on not() comparison

Returns:
this Constraint to allow the chaining of method calls


Authors: Thomas Mahler and others. (C) 2000, 2001.
All rights reserved. Published under the Gnu Public License.
http://objectbridge.sourceforge.net
Version: 0.8.375, 2002-04-04