S.O.D.A. - Simple Object Database Access - design documentation v. (unknown).

org.odbms
Interface Constraint

All Known Subinterfaces:
Constraints

public interface Constraint

constraint to limit the objects returned upon query execution.

Constraints are constructed by calling Query.constrain().

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

The methods to modify the constraint evaluation algorithm may be merged, to construct combined evaluation rules. Examples:


Method Summary
 Constraint and(Constraint with)
          links two Constraints for AND evaluation.
 Constraint contains()
          sets the evaluation mode to containment comparison.
 Constraint equal()
          sets the evaluation mode to ==.
 Object getObject()
          returns the Object the query graph was constrained with to create this Constraint.
 Constraint greater()
          sets the evaluation mode to >.
 Constraint identity()
          sets the evaluation mode to identity comparison.
 Constraint like()
          sets the evaluation mode to "like" comparison.
 Constraint not()
          turns on not() comparison.
 Constraint or(Constraint with)
          links two Constraints for OR evaluation.
 Constraint smaller()
          sets the evaluation mode to <.
 

Method Detail

and

public Constraint and(Constraint with)
links two Constraints for AND evaluation.

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

or

public Constraint or(Constraint with)
links two Constraints for OR evaluation.

Parameters:
with - 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.

smaller

public Constraint smaller()
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.

Evaluation is dependant on the constrained query node:
String
the persistent object is tested to contain a substring.
arrays, collections
the persistent object is tested to contain all elements of the constraining object.

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.

getObject

public Object getObject()
returns the Object the query graph was constrained with to create this Constraint.

Returns:
Object the constraining object.

S.O.D.A. - Simple Object Database Access - design documentation v. (unknown).

You can get the current version of the specification at the S.O.D.A project at Sourceforge.
Build time of the docs you are viewing: Thursday, 19.09.2002, 23:39 GMT