Criteria
instead.@Deprecated public class Criteria extends Object implements org.springframework.data.relational.core.query.CriteriaDefinition
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
Modifier and Type | Class and Description |
---|---|
static interface |
Criteria.CriteriaStep
Deprecated.
Interface declaring terminal builder methods to build a
Criteria . |
Modifier and Type | Method and Description |
---|---|
Criteria |
and(Criteria criteria)
Deprecated.
|
Criteria |
and(List<Criteria> criteria)
Deprecated.
|
Criteria.CriteriaStep |
and(String column)
Deprecated.
|
static Criteria |
empty()
Deprecated.
Static factory method to create an empty Criteria.
|
static Criteria |
from(Criteria... criteria)
Deprecated.
|
static Criteria |
from(List<Criteria> criteria)
Deprecated.
|
org.springframework.data.relational.core.sql.SqlIdentifier |
getColumn()
Deprecated.
|
org.springframework.data.relational.core.query.CriteriaDefinition.Combinator |
getCombinator()
Deprecated.
|
org.springframework.data.relational.core.query.CriteriaDefinition.Comparator |
getComparator()
Deprecated.
|
List<org.springframework.data.relational.core.query.CriteriaDefinition> |
getGroup()
Deprecated.
|
Criteria |
getPrevious()
Deprecated.
|
Object |
getValue()
Deprecated.
|
boolean |
hasPrevious()
Deprecated.
|
Criteria |
ignoreCase(boolean ignoreCase)
Deprecated.
Creates a new
Criteria with the given "ignore case" flag. |
boolean |
isEmpty()
Deprecated.
|
boolean |
isGroup()
Deprecated.
|
boolean |
isIgnoreCase()
Deprecated.
Checks whether comparison should be done in case-insensitive way.
|
Criteria |
or(Criteria criteria)
Deprecated.
|
Criteria |
or(List<Criteria> criteria)
Deprecated.
|
Criteria.CriteriaStep |
or(String column)
Deprecated.
|
static Criteria.CriteriaStep |
where(String column)
Deprecated.
Static factory method to create a Criteria using the provided
column name. |
public static Criteria empty()
empty
in interface org.springframework.data.relational.core.query.CriteriaDefinition
Criteria
.public static Criteria from(Criteria... criteria)
Criteria
.public static Criteria from(List<Criteria> criteria)
Criteria
.public static Criteria.CriteriaStep where(String column)
column
name.column
- Must not be null or empty.Criteria.CriteriaStep
object to complete the first Criteria
.public Criteria.CriteriaStep and(String column)
column
- Must not be null or empty.Criteria.CriteriaStep
object to complete the next Criteria
.public Criteria and(Criteria criteria)
criteria
- criteria object.Criteria
object.public Criteria and(List<Criteria> criteria)
criteria
- criteria objects.Criteria
object.public Criteria.CriteriaStep or(String column)
column
- Must not be null or empty.Criteria.CriteriaStep
object to complete the next Criteria
.public Criteria or(Criteria criteria)
criteria
- criteria object.Criteria
object.public Criteria or(List<Criteria> criteria)
criteria
- criteria object.Criteria
object.public Criteria ignoreCase(boolean ignoreCase)
Criteria
with the given "ignore case" flag.ignoreCase
- true if comparison should be done in case-insensitive wayCriteria
object@Nullable public Criteria getPrevious()
getPrevious
in interface org.springframework.data.relational.core.query.CriteriaDefinition
Criteria
object. Can be null if there is no previous Criteria
.hasPrevious()
public boolean hasPrevious()
hasPrevious
in interface org.springframework.data.relational.core.query.CriteriaDefinition
Criteria
has a previous one.public boolean isEmpty()
isEmpty
in interface org.springframework.data.relational.core.query.CriteriaDefinition
Criteria
is empty.public boolean isGroup()
isGroup
in interface org.springframework.data.relational.core.query.CriteriaDefinition
Criteria
is empty.public org.springframework.data.relational.core.query.CriteriaDefinition.Combinator getCombinator()
getCombinator
in interface org.springframework.data.relational.core.query.CriteriaDefinition
Combinator
to combine this criteria with a previous one.public List<org.springframework.data.relational.core.query.CriteriaDefinition> getGroup()
getGroup
in interface org.springframework.data.relational.core.query.CriteriaDefinition
@Nullable public org.springframework.data.relational.core.sql.SqlIdentifier getColumn()
getColumn
in interface org.springframework.data.relational.core.query.CriteriaDefinition
@Nullable public org.springframework.data.relational.core.query.CriteriaDefinition.Comparator getComparator()
getComparator
in interface org.springframework.data.relational.core.query.CriteriaDefinition
Comparator
.@Nullable public Object getValue()
getValue
in interface org.springframework.data.relational.core.query.CriteriaDefinition
public boolean isIgnoreCase()
isIgnoreCase
in interface org.springframework.data.relational.core.query.CriteriaDefinition
Copyright © 2018–2022 Pivotal Software, Inc.. All rights reserved.