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
ModifierConstructorDescriptionprotected
Criteria
(ColumnName columnName) Create an emptyCriteria
given aColumnName
. -
Method Summary
Modifier and TypeMethodDescriptionCreate a criterion using the CONTAINS operator.containsKey
(Object key) Create a criterion using the CONTAINS KEY operator.boolean
Get the identifying key.Create a criterion using the < operator.Create a criterion using the <= operator.int
hashCode()
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 Criteria
of
(ColumnName columnName, CriteriaDefinition.Predicate predicate) Static factory method to create aCriteria
using the providedcolumnName
.protected boolean
simpleCriteriaEquals
(CriteriaDefinition left, CriteriaDefinition right) toString()
static Criteria
Static factory method to create aCriteria
using the providedcolumnName
.static Criteria
where
(ColumnName columnName) Static factory method to create aCriteria
using the providedColumnName
.
-
Constructor Details
-
Criteria
Create an emptyCriteria
given aColumnName
.
-
-
Method Details
-
where
Static factory method to create aCriteria
using the providedcolumnName
.- Parameters:
columnName
- must not be null.- Returns:
- a new
Criteria
forcolumnName
.
-
where
Static factory method to create aCriteria
using the providedColumnName
.- Parameters:
columnName
- must not be null.- Returns:
- a new
Criteria
forcolumnName
. - Since:
- 2.2
-
of
Static factory method to create aCriteria
using the providedcolumnName
.- Parameters:
columnName
- must not be null.- Returns:
- a new
Criteria
forcolumnName
.
-
is
Create a criterion using equality.- Parameters:
value
- the value to match against, may be null.- Returns:
- this
Criteria
object.
-
ne
Create a criterion using the != operator.- Parameters:
value
- the value to match against, may be null.- Returns:
- this
Criteria
object. - Since:
- 2.1
-
isNotNull
Create a criterion using the IS NOT NULL operator.- Returns:
- this
Criteria
object. - Since:
- 2.1
-
lt
Create a criterion using the > operator.- Parameters:
value
- the value to match against.- Returns:
- this
Criteria
object.
-
lte
Create a criterion using the >= operator.- Parameters:
value
- the value to match against.- Returns:
- this
Criteria
object.
-
gt
Create a criterion using the < operator.- Parameters:
value
- the value to match against.- Returns:
- this
Criteria
object.
-
gte
Create a criterion using the <= operator.- Parameters:
value
- the value to match against.- Returns:
- this
Criteria
object.
-
in
Create a criterion using the IN operator.- Parameters:
values
- the values to match against.- Returns:
- this
Criteria
object.
-
in
Create a criterion using the IN operator.- Parameters:
values
- the collection of values to match against.- Returns:
- this
Criteria
object.
-
like
Create a criterion using the LIKE operator.- Parameters:
value
- the value to match against.- Returns:
- this
Criteria
object.
-
contains
Create a criterion using the CONTAINS operator.- Parameters:
value
- the value to match against.- Returns:
- this
Criteria
object.
-
containsKey
Create a criterion using the CONTAINS KEY operator.- Parameters:
key
- the key to match against.- Returns:
- this
Criteria
object.
-
getColumnName
Description copied from interface:CriteriaDefinition
Get the identifying key.- Specified by:
getColumnName
in interfaceCriteriaDefinition
- Returns:
- the
ColumnName
.
-
getPredicate
Description copied from interface:CriteriaDefinition
- Specified by:
getPredicate
in interfaceCriteriaDefinition
- Returns:
- the
CriteriaDefinition.Predicate
.
-
equals
-
simpleCriteriaEquals
-
hashCode
public int hashCode() -
toString
-