java.lang.Object
org.springframework.data.relational.core.query.Criteria
All Implemented Interfaces:
CriteriaDefinition

public class Criteria extends Object implements CriteriaDefinition
Central value class for creating criteria predicates. It follows a fluent (and immutable) API style so that you can easily chain together multiple criteria. Static import of the Criteria.property(…) method will improve readability as in where(property(…).is(…).

The Criteria API supports composition with a NULL object and a static factory method. Example usage:

 Criteria.from(Criteria.where("name").is("Foo"), Criteria.from(Criteria.where("age").greaterThan(42)));
 
rendering:
 WHERE name = 'Foo' AND age > 42
 
Since:
2.0
Author:
Mark Paluch, Oliver Drotbohm, Roman Chigvintsev, Jens Schauder