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

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

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

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

Returns:
this Constraint to allow the chaining of method calls

greater

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

Returns:
this Constraint to allow the chaining of method calls

greaterOrEqual

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

Returns:
this Constraint to allow the chaining of method calls

smaller

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

Returns:
this Constraint to allow the chaining of method calls

smallerOrEqual

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

Returns:
this Constraint to allow the chaining of method calls

identity

Constraint identity()
sets the evaluation mode to identity comparison

Returns:
this Constraint to allow the chaining of method calls

like

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

Returns:
this Constraint to allow the chaining of method calls

contains

Constraint contains()
sets the evaluation mode to containment comparison

Returns:
this Constraint to allow the chaining of method calls

is

Constraint is()
turns off not() comparison

Returns:
this Constraint to allow the chaining of method calls

not

Constraint not()
turns on not() comparison

Returns:
this Constraint to allow the chaining of method calls


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.