Class Criteria
java.lang.Object
org.springframework.data.cassandra.core.query.Criteria
- All Implemented Interfaces:
CriteriaDefinition
Basic class for creating queries. It follows a fluent API style so that you can easily create a
CriteriaDefinition. Static import of the 'Criteria.where' method will improve readability.- Since:
- 2.0
- Author:
- Mark Paluch
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.cassandra.core.query.CriteriaDefinition
CriteriaDefinition.Operator, CriteriaDefinition.Operators, CriteriaDefinition.Predicate -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCriteria(ColumnName columnName) Create an emptyCriteriagiven aColumnName. -
Method Summary
Modifier and TypeMethodDescriptionCreate a criterion using the CONTAINS operator.containsKey(Object key) Create a criterion using the CONTAINS KEY operator.booleanGet the identifying key.Create a criterion using the < operator.Create a criterion using the <= operator.inthashCode()Create a criterion using the IN operator.in(Collection<?> values) Create a criterion using the IN operator.Create a criterion using equality.Create a criterion using the IS NOT NULL operator.Create a criterion using the LIKE operator.Create a criterion using the > operator.Create a criterion using the >= operator.Create a criterion using the != operator.static Criteriaof(ColumnName columnName, CriteriaDefinition.Predicate predicate) Static factory method to create aCriteriausing the providedcolumnName.protected booleansimpleCriteriaEquals(CriteriaDefinition left, CriteriaDefinition right) toString()static CriteriaStatic factory method to create aCriteriausing the providedcolumnName.static Criteriawhere(ColumnName columnName) Static factory method to create aCriteriausing the providedColumnName.
-
Constructor Details
-
Criteria
Create an emptyCriteriagiven aColumnName.
-
-
Method Details
-
where
Static factory method to create aCriteriausing the providedcolumnName.- Parameters:
columnName- must not be null.- Returns:
- a new
CriteriaforcolumnName.
-
where
Static factory method to create aCriteriausing the providedColumnName.- Parameters:
columnName- must not be null.- Returns:
- a new
CriteriaforcolumnName. - Since:
- 2.2
-
of
Static factory method to create aCriteriausing the providedcolumnName.- Parameters:
columnName- must not be null.- Returns:
- a new
CriteriaforcolumnName.
-
is
Create a criterion using equality.- Parameters:
value- the value to match against, may be null.- Returns:
- this
Criteriaobject.
-
ne
Create a criterion using the != operator.- Parameters:
value- the value to match against, may be null.- Returns:
- this
Criteriaobject. - Since:
- 2.1
-
isNotNull
Create a criterion using the IS NOT NULL operator.- Returns:
- this
Criteriaobject. - Since:
- 2.1
-
lt
Create a criterion using the > operator.- Parameters:
value- the value to match against.- Returns:
- this
Criteriaobject.
-
lte
Create a criterion using the >= operator.- Parameters:
value- the value to match against.- Returns:
- this
Criteriaobject.
-
gt
Create a criterion using the < operator.- Parameters:
value- the value to match against.- Returns:
- this
Criteriaobject.
-
gte
Create a criterion using the <= operator.- Parameters:
value- the value to match against.- Returns:
- this
Criteriaobject.
-
in
Create a criterion using the IN operator.- Parameters:
values- the values to match against.- Returns:
- this
Criteriaobject.
-
in
Create a criterion using the IN operator.- Parameters:
values- the collection of values to match against.- Returns:
- this
Criteriaobject.
-
like
Create a criterion using the LIKE operator.- Parameters:
value- the value to match against.- Returns:
- this
Criteriaobject.
-
contains
Create a criterion using the CONTAINS operator.- Parameters:
value- the value to match against.- Returns:
- this
Criteriaobject.
-
containsKey
Create a criterion using the CONTAINS KEY operator.- Parameters:
key- the key to match against.- Returns:
- this
Criteriaobject.
-
getColumnName
Description copied from interface:CriteriaDefinitionGet the identifying key.- Specified by:
getColumnNamein interfaceCriteriaDefinition- Returns:
- the
ColumnName.
-
getPredicate
Description copied from interface:CriteriaDefinition- Specified by:
getPredicatein interfaceCriteriaDefinition- Returns:
- the
CriteriaDefinition.Predicate.
-
equals
-
simpleCriteriaEquals
-
hashCode
public int hashCode() -
toString
-