Package io.micronaut.data.model.query
Interface Criteria
- All Known Subinterfaces:
QueryModel
- All Known Implementing Classes:
AssociationQuery
,DefaultQuery
Deprecated, for removal: This API element is subject to removal in a future version.
Replaced by JPA criteria
Interface used for the construction of queries at compilation time an implementation may optionally
provide an implementation of this at runtime.
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Method Summary
Modifier and TypeMethodDescription@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Apply an "equals" constraint to each property in the key set of aMap
.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a logical conjunction.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the results by the given property value range (inclusive).@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property match to strings containing with the given value.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property match to strings ending with the given value.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates an "equals" Criterion based on the specified property name and value.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a subquery criterion that ensures the given property is equals to all the given returned values.@NonNull Criteria
eqProperty
(@NonNull String propertyName, @NonNull String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constrains a property to be equal to a specified other property.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be greater than or equal to the given value.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a subquery criterion that ensures the given property is greater than or equals to all the given returned values.@NonNull Criteria
geProperty
(@NonNull String propertyName, @NonNull String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constrains a property to be greater than or equal to a specified other property.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a subquery criterion that ensures the given property is greater than or equal to some of the given values.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be greater than or equal to the given value.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a subquery criterion that ensures the given property is greater than all the given returned values.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be greater than or equal to the given value.@NonNull Criteria
gtProperty
(@NonNull String propertyName, @NonNull String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constrains a property to be greater than a specified other property.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a subquery criterion that ensures the given property is greater than some of the given values.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates an "equals" Criterion based on the specified property name and value.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates an ilike Criterion based on the specified property name and value.@NonNull Criteria
inList
(@NonNull String propertyName, @NonNull QueryModel subquery) Deprecated, for removal: This API element is subject to removal in a future version.Creates an "in" Criterion using a subquery.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates an "in" Criterion based on the specified property name and list of values.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a criterion that asserts the given property is empty (such as a blank string).@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a criterion that asserts the given property is false.@NonNull Criteria
isNotEmpty
(@NonNull String propertyName) Deprecated, for removal: This API element is subject to removal in a future version.Creates a criterion that asserts the given property is not empty.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a criterion that asserts the given property is not null.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a criterion that asserts the given property is null.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a criterion that asserts the given property is true.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be less than or equal to the given value.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a subquery criterion that ensures the given property is less than or equal to all the given returned values.@NonNull Criteria
leProperty
(String propertyName, @NonNull String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constrains a property to be less than or equal to a specified other property.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a subquery criterion that ensures the given property is less than or equal to some of the given values.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a like Criterion based on the specified property name and value.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be less than or equal to the given value.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a subquery criterion that ensures the given property is less than all the given returned values.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be less than or equal to the given value.@NonNull Criteria
ltProperty
(@NonNull String propertyName, @NonNull String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constrains a property to be less than a specified other property.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a subquery criterion that ensures the given property is less than some of the given values.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a "not equals" Criterion based on the specified property name and value.@NonNull Criteria
neProperty
(@NonNull String propertyName, @NonNull String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constrains a property to be not equal to a specified other property.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a logical negation.@NonNull Criteria
notIn
(@NonNull String propertyName, @NonNull QueryModel subquery) Deprecated, for removal: This API element is subject to removal in a future version.Creates a negated "in" Criterion using a subquery.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a logical disjunction.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a rlike Criterion based on the specified property name and value.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a Criterion that constrains a collection property by size.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a Criterion that constrains a collection property to be greater than or equal to the given size.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a Criterion that constrains a collection property to be greater than the given size.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a Criterion that constrains a collection property to be less than or equal to the given size.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a Criterion that constrains a collection property to be less than to the given size.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates a Criterion that constrains a collection property to be not equal to the given size.@NonNull Criteria
startsWith
(@NonNull String propertyName, @NonNull Object parameter) Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property match to strings starting with the given value.@NonNull Criteria
Deprecated, for removal: This API element is subject to removal in a future version.Creates that restricts the version to the given value.
-
Method Details
-
idEq
Deprecated, for removal: This API element is subject to removal in a future version.Creates an "equals" Criterion based on the specified property name and value.- Parameters:
parameter
- The parameter that provides the value- Returns:
- The criteria
-
versionEq
Deprecated, for removal: This API element is subject to removal in a future version.Creates that restricts the version to the given value.- Parameters:
parameter
- The parameter that provides the value- Returns:
- The criteria
-
isEmpty
Deprecated, for removal: This API element is subject to removal in a future version.Creates a criterion that asserts the given property is empty (such as a blank string).- Parameters:
propertyName
- The property name- Returns:
- The criteria
-
isNotEmpty
Deprecated, for removal: This API element is subject to removal in a future version.Creates a criterion that asserts the given property is not empty.- Parameters:
propertyName
- The property name- Returns:
- The criteria
-
isNull
Deprecated, for removal: This API element is subject to removal in a future version.Creates a criterion that asserts the given property is null.- Parameters:
propertyName
- The property name- Returns:
- The criteria
-
isTrue
Deprecated, for removal: This API element is subject to removal in a future version.Creates a criterion that asserts the given property is true.- Parameters:
propertyName
- The property name- Returns:
- The criteria
-
isFalse
Deprecated, for removal: This API element is subject to removal in a future version.Creates a criterion that asserts the given property is false.- Parameters:
propertyName
- The property name- Returns:
- The criteria
-
isNotNull
Deprecated, for removal: This API element is subject to removal in a future version.Creates a criterion that asserts the given property is not null.- Parameters:
propertyName
- The property name- Returns:
- The criteria
-
eq
Deprecated, for removal: This API element is subject to removal in a future version.Creates an "equals" Criterion based on the specified property name and value.- Parameters:
propertyName
- The property nameparameter
- The parameter that provides the value- Returns:
- The criteria
-
ne
@NonNull @NonNull Criteria ne(@NonNull @NonNull String propertyName, @NonNull @NonNull Object parameter) Deprecated, for removal: This API element is subject to removal in a future version.Creates a "not equals" Criterion based on the specified property name and value.- Parameters:
propertyName
- The property nameparameter
- The parameter that provides the value- Returns:
- The criteria
-
between
@NonNull @NonNull Criteria between(@NonNull @NonNull String propertyName, @NonNull @NonNull Object start, @NonNull @NonNull Object finish) Deprecated, for removal: This API element is subject to removal in a future version.Restricts the results by the given property value range (inclusive).- Parameters:
propertyName
- The property namestart
- The start of the rangefinish
- The end of the range- Returns:
- The criteria
-
gte
@NonNull @NonNull Criteria gte(@NonNull @NonNull String property, @NonNull @NonNull Object parameter) Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be greater than or equal to the given value.- Parameters:
property
- The propertyparameter
- The parameter that provides the value- Returns:
- The Criterion instance
-
ge
@NonNull @NonNull Criteria ge(@NonNull @NonNull String property, @NonNull @NonNull Object parameter) Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be greater than or equal to the given value.- Parameters:
property
- The propertyparameter
- The parameter that provides the value- Returns:
- The Criterion instance
-
gt
@NonNull @NonNull Criteria gt(@NonNull @NonNull String property, @NonNull @NonNull Object parameter) Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be greater than or equal to the given value.- Parameters:
property
- The propertyparameter
- The parameter that provides the value- Returns:
- The Criterion instance
-
lte
@NonNull @NonNull Criteria lte(@NonNull @NonNull String property, @NonNull @NonNull Object parameter) Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be less than or equal to the given value.- Parameters:
property
- The propertyparameter
- The parameter that provides the value- Returns:
- The Criterion instance
-
le
@NonNull @NonNull Criteria le(@NonNull @NonNull String property, @NonNull @NonNull Object parameter) Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be less than or equal to the given value.- Parameters:
property
- The propertyparameter
- The parameter that provides the value- Returns:
- The Criterion instance
-
lt
@NonNull @NonNull Criteria lt(@NonNull @NonNull String property, @NonNull @NonNull Object parameter) Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be less than or equal to the given value.- Parameters:
property
- The propertyparameter
- The parameter that provides the value- Returns:
- The Criterion instance
-
like
@NonNull @NonNull Criteria like(@NonNull @NonNull String propertyName, @NonNull @NonNull Object parameter) Deprecated, for removal: This API element is subject to removal in a future version.Creates a like Criterion based on the specified property name and value.- Parameters:
propertyName
- The property nameparameter
- The parameter that provides the value- Returns:
- The criteria
-
startsWith
@NonNull @NonNull Criteria startsWith(@NonNull @NonNull String propertyName, @NonNull @NonNull Object parameter) Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property match to strings starting with the given value.- Parameters:
propertyName
- The property nameparameter
- The parameter that provides the value- Returns:
- The criteria
-
endsWith
@NonNull @NonNull Criteria endsWith(@NonNull @NonNull String propertyName, @NonNull @NonNull Object parameter) Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property match to strings ending with the given value.- Parameters:
propertyName
- The property nameparameter
- The parameter that provides the value- Returns:
- The criteria
-
contains
@NonNull @NonNull Criteria contains(@NonNull @NonNull String propertyName, @NonNull @NonNull Object parameter) Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property match to strings containing with the given value.- Parameters:
propertyName
- The property nameparameter
- The parameter that provides the value- Returns:
- The criteria
-
ilike
@NonNull @NonNull Criteria ilike(@NonNull @NonNull String propertyName, @NonNull @NonNull Object parameter) Deprecated, for removal: This API element is subject to removal in a future version.Creates an ilike Criterion based on the specified property name and value. Unlike a like condition, ilike is case-insensitive.- Parameters:
propertyName
- The property nameparameter
- The parameter that provides the value- Returns:
- The criteria
-
rlike
@NonNull @NonNull Criteria rlike(@NonNull @NonNull String propertyName, @NonNull @NonNull Object parameter) Deprecated, for removal: This API element is subject to removal in a future version.Creates a rlike Criterion based on the specified property name and value.- Parameters:
propertyName
- The property nameparameter
- The parameter that provides the value- Returns:
- The criteria
-
and
Deprecated, for removal: This API element is subject to removal in a future version.Creates a logical conjunction.- Parameters:
other
- The other criteria- Returns:
- This criteria
-
or
Deprecated, for removal: This API element is subject to removal in a future version.Creates a logical disjunction.- Parameters:
other
- The other criteria- Returns:
- This criteria
-
not
Deprecated, for removal: This API element is subject to removal in a future version.Creates a logical negation.- Parameters:
other
- The other criteria- Returns:
- This criteria
-
inList
@NonNull @NonNull Criteria inList(@NonNull @NonNull String propertyName, @NonNull @NonNull QueryModel subquery) Deprecated, for removal: This API element is subject to removal in a future version.Creates an "in" Criterion using a subquery.- Parameters:
propertyName
- The property namesubquery
- The subquery- Returns:
- The criteria
-
inList
@NonNull @NonNull Criteria inList(@NonNull @NonNull String propertyName, @NonNull @NonNull Object parameter) Deprecated, for removal: This API element is subject to removal in a future version.Creates an "in" Criterion based on the specified property name and list of values.- Parameters:
propertyName
- The property nameparameter
- The parameter that provides the value- Returns:
- The criteria
-
notIn
@NonNull @NonNull Criteria notIn(@NonNull @NonNull String propertyName, @NonNull @NonNull QueryModel subquery) Deprecated, for removal: This API element is subject to removal in a future version.Creates a negated "in" Criterion using a subquery.- Parameters:
propertyName
- The property namesubquery
- The subquery- Returns:
- The criteria
-
sizeEq
@NonNull @NonNull Criteria sizeEq(@NonNull @NonNull String propertyName, @NonNull @NonNull Object size) Deprecated, for removal: This API element is subject to removal in a future version.Creates a Criterion that constrains a collection property by size.- Parameters:
propertyName
- The property namesize
- The size to constrain by- Returns:
- This criteria
-
sizeGt
@NonNull @NonNull Criteria sizeGt(@NonNull @NonNull String propertyName, @NonNull @NonNull Object size) Deprecated, for removal: This API element is subject to removal in a future version.Creates a Criterion that constrains a collection property to be greater than the given size.- Parameters:
propertyName
- The property namesize
- The size to constrain by- Returns:
- This criteria
-
sizeGe
@NonNull @NonNull Criteria sizeGe(@NonNull @NonNull String propertyName, @NonNull @NonNull Object size) Deprecated, for removal: This API element is subject to removal in a future version.Creates a Criterion that constrains a collection property to be greater than or equal to the given size.- Parameters:
propertyName
- The property namesize
- The size to constrain by- Returns:
- This criteria
-
sizeLe
@NonNull @NonNull Criteria sizeLe(@NonNull @NonNull String propertyName, @NonNull @NonNull Object size) Deprecated, for removal: This API element is subject to removal in a future version.Creates a Criterion that constrains a collection property to be less than or equal to the given size.- Parameters:
propertyName
- The property namesize
- The size to constrain by- Returns:
- This criteria
-
sizeLt
@NonNull @NonNull Criteria sizeLt(@NonNull @NonNull String propertyName, @NonNull @NonNull Object size) Deprecated, for removal: This API element is subject to removal in a future version.Creates a Criterion that constrains a collection property to be less than to the given size.- Parameters:
propertyName
- The property namesize
- The size to constrain by- Returns:
- This criteria
-
sizeNe
@NonNull @NonNull Criteria sizeNe(@NonNull @NonNull String propertyName, @NonNull @NonNull Object size) Deprecated, for removal: This API element is subject to removal in a future version.Creates a Criterion that constrains a collection property to be not equal to the given size.- Parameters:
propertyName
- The property namesize
- The size to constrain by- Returns:
- This criteria
-
eqProperty
@NonNull @NonNull Criteria eqProperty(@NonNull @NonNull String propertyName, @NonNull @NonNull String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constrains a property to be equal to a specified other property.- Parameters:
propertyName
- The propertyotherPropertyName
- The other property- Returns:
- This criteria
-
neProperty
@NonNull @NonNull Criteria neProperty(@NonNull @NonNull String propertyName, @NonNull @NonNull String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constrains a property to be not equal to a specified other property.- Parameters:
propertyName
- The propertyotherPropertyName
- The other property- Returns:
- This criteria
-
gtProperty
@NonNull @NonNull Criteria gtProperty(@NonNull @NonNull String propertyName, @NonNull @NonNull String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constrains a property to be greater than a specified other property.- Parameters:
propertyName
- The propertyotherPropertyName
- The other property- Returns:
- This criteria
-
geProperty
@NonNull @NonNull Criteria geProperty(@NonNull @NonNull String propertyName, @NonNull @NonNull String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constrains a property to be greater than or equal to a specified other property.- Parameters:
propertyName
- The propertyotherPropertyName
- The other property- Returns:
- This criteria
-
ltProperty
@NonNull @NonNull Criteria ltProperty(@NonNull @NonNull String propertyName, @NonNull @NonNull String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constrains a property to be less than a specified other property.- Parameters:
propertyName
- The propertyotherPropertyName
- The other property- Returns:
- This criteria
-
leProperty
@NonNull @NonNull Criteria leProperty(String propertyName, @NonNull @NonNull String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constrains a property to be less than or equal to a specified other property.- Parameters:
propertyName
- The propertyotherPropertyName
- The other property- Returns:
- This criteria
-
allEq
Deprecated, for removal: This API element is subject to removal in a future version.Apply an "equals" constraint to each property in the key set of aMap
.- Parameters:
propertyValues
- a map from property names to values- Returns:
- Criterion
-
eqAll
@NonNull @NonNull Criteria eqAll(@NonNull @NonNull String propertyName, @NonNull @NonNull Criteria propertyValue) Deprecated, for removal: This API element is subject to removal in a future version.Creates a subquery criterion that ensures the given property is equals to all the given returned values.- Parameters:
propertyName
- The property namepropertyValue
- A subquery- Returns:
- This criterion instance
-
gtAll
@NonNull @NonNull Criteria gtAll(@NonNull @NonNull String propertyName, @NonNull @NonNull Criteria propertyValue) Deprecated, for removal: This API element is subject to removal in a future version.Creates a subquery criterion that ensures the given property is greater than all the given returned values.- Parameters:
propertyName
- The property namepropertyValue
- A subquery- Returns:
- This criterion instance
-
ltAll
@NonNull @NonNull Criteria ltAll(@NonNull @NonNull String propertyName, @NonNull @NonNull Criteria propertyValue) Deprecated, for removal: This API element is subject to removal in a future version.Creates a subquery criterion that ensures the given property is less than all the given returned values.- Parameters:
propertyName
- The property namepropertyValue
- A subquery- Returns:
- This criterion instance
-
geAll
@NonNull @NonNull Criteria geAll(@NonNull @NonNull String propertyName, @NonNull @NonNull Criteria propertyValue) Deprecated, for removal: This API element is subject to removal in a future version.Creates a subquery criterion that ensures the given property is greater than or equals to all the given returned values.- Parameters:
propertyName
- The property namepropertyValue
- A subquery- Returns:
- This criterion instance
-
leAll
@NonNull @NonNull Criteria leAll(@NonNull @NonNull String propertyName, @NonNull @NonNull Criteria propertyValue) Deprecated, for removal: This API element is subject to removal in a future version.Creates a subquery criterion that ensures the given property is less than or equal to all the given returned values.- Parameters:
propertyName
- The property namepropertyValue
- A subquery- Returns:
- This criterion instance
-
gtSome
@NonNull @NonNull Criteria gtSome(@NonNull @NonNull String propertyName, @NonNull @NonNull Criteria propertyValue) Deprecated, for removal: This API element is subject to removal in a future version.Creates a subquery criterion that ensures the given property is greater than some of the given values.- Parameters:
propertyName
- The property namepropertyValue
- The property value- Returns:
- This Criteria instance
-
geSome
@NonNull @NonNull Criteria geSome(@NonNull @NonNull String propertyName, @NonNull @NonNull Criteria propertyValue) Deprecated, for removal: This API element is subject to removal in a future version.Creates a subquery criterion that ensures the given property is greater than or equal to some of the given values.- Parameters:
propertyName
- The property namepropertyValue
- The property value- Returns:
- This Criteria instance
-
ltSome
@NonNull @NonNull Criteria ltSome(@NonNull @NonNull String propertyName, @NonNull @NonNull Criteria propertyValue) Deprecated, for removal: This API element is subject to removal in a future version.Creates a subquery criterion that ensures the given property is less than some of the given values.- Parameters:
propertyName
- The property namepropertyValue
- The property value- Returns:
- This Criteria instance
-
leSome
@NonNull @NonNull Criteria leSome(@NonNull @NonNull String propertyName, @NonNull @NonNull Criteria propertyValue) Deprecated, for removal: This API element is subject to removal in a future version.Creates a subquery criterion that ensures the given property is less than or equal to some of the given values.- Parameters:
propertyName
- The property namepropertyValue
- The property value- Returns:
- This Criteria instance
-