Class Restrictions
java.lang.Object
io.micronaut.data.model.query.factory.Restrictions
Deprecated, for removal: This API element is subject to removal in a future version.
Replaced by JPA criteria
Factory for creating criterion instances.
- Since:
- 1.0
- Author:
- graemerocher
-
Constructor Summary
ConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic QueryModel.Criterion
Deprecated, for removal: This API element is subject to removal in a future version.Logical OR.static QueryModel.ArrayContains
arrayContains
(String property, Object parameter) Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property to be contained in the array.static QueryModel.Between
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the results by the given property value range.static QueryModel.Contains
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property match to strings containing the given value.static QueryModel.EndsWith
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.static QueryModel.Equals
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property to be equal to the given value.static QueryModel.EqualsProperty
eqProperty
(String propertyName, String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constraints a property to be equal to a specified other property.geProperty
(String propertyName, String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constraints a property to be greater than or equal to a specified other property.static QueryModel.GreaterThan
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be greater than the given value.static QueryModel.GreaterThanEquals
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.gtProperty
(String propertyName, String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constraints a property to be greater than a specified other property.static QueryModel.IdEquals
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property to be equal to the given value.static QueryModel.ILike
Deprecated, for removal: This API element is subject to removal in a future version.Case-insensitive like.static QueryModel.In
in
(String property, QueryModel subquery) Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property to be in the list of given values.static QueryModel.In
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property to be in the list of given values.static QueryModel.IsEmpty
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be empty (such as a blank string or an empty collection).static QueryModel.IsFalse
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be false.static QueryModel.IsNotEmpty
isNotEmpty
(String property) Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be not empty (such as a non-blank string).static QueryModel.IsNotNull
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be null.static QueryModel.IsNull
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be null.static QueryModel.IsTrue
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be true.leProperty
(String propertyName, String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constraints a property to be less than or equal to a specified other property.static QueryModel.Like
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property match the given String expressions.static QueryModel.LessThan
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be less than the given value.static QueryModel.LessThanEquals
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.static QueryModel.LessThanProperty
ltProperty
(String propertyName, String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constraints a property to be less than a specified other property.static QueryModel.NotEquals
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property to be not equal to the given value.static QueryModel.NotEqualsProperty
neProperty
(String propertyName, String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constraints a property to be not equal to a specified other property.static QueryModel.NotIn
notIn
(String property, QueryModel subquery) Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property to be in the list of given values.static QueryModel.NotIn
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property to not be in the list of given values.static QueryModel.Criterion
Deprecated, for removal: This API element is subject to removal in a future version.Logical OR.static QueryModel.Regex
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property match the given regex expressions.static QueryModel.RLike
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property match the given regular expressions.static QueryModel.SizeEquals
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict the size of a collection property.Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict the size of a collection property to be greater than or equal to the given value.static QueryModel.SizeGreaterThan
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict the size of a collection property to be greater than the given value.Deprecated, for removal: This API element is subject to removal in a future version.Creates a Criterion that contrains a collection property to be less than or equal to the given size.static QueryModel.SizeLessThan
Deprecated, for removal: This API element is subject to removal in a future version.Creates a Criterion that contrains a collection property to be less than to the given size.static QueryModel.SizeNotEquals
Deprecated, for removal: This API element is subject to removal in a future version.Creates a Criterion that contrains a collection property to be not equal to the given size.static QueryModel.StartsWith
startsWith
(String property, Object expression) 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.static QueryModel.VersionEquals
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property to be equal to the given value.
-
Constructor Details
-
Restrictions
public Restrictions()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
eq
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property to be equal to the given value.- Parameters:
property
- The propertyparameter
- The parameter that provides the value- Returns:
- An instance of Query.Equals
-
idEq
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property to be equal to the given value.- Parameters:
parameter
- The parameter that provides the value- Returns:
- An instance of Query.Equals
-
versionEq
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property to be equal to the given value.- Parameters:
parameter
- The parameter that provides the value- Returns:
- An instance of Query.Equals
-
ne
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property to be not equal to the given value.- Parameters:
property
- The propertyparameter
- The parameter that provides the value- Returns:
- An instance of Query.Equals
-
in
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property to be in the list of given values.- Parameters:
property
- The propertyparameter
- The parameter that provides the value- Returns:
- An instance of Query.In
-
notIn
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property to not be in the list of given values.- Parameters:
property
- The propertyparameter
- The parameter that provides the value- Returns:
- An instance of Query.In
-
in
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property to be in the list of given values.- Parameters:
property
- The propertysubquery
- The subquery- Returns:
- An instance of Query.In
-
notIn
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property to be in the list of given values.- Parameters:
property
- The propertysubquery
- The subquery- Returns:
- An instance of Query.In
-
like
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property match the given String expressions. Expressions use SQL-like % to denote wildcards- Parameters:
property
- The property nameexpression
- The expression- Returns:
- An instance of Query.Like
-
regex
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property match the given regex expressions.- Parameters:
property
- The property nameexpression
- The expression- Returns:
- An instance of Query.Like
-
startsWith
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:
property
- The property nameexpression
- The expression- Returns:
- An instance of Query.StartsWith
-
contains
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property match to strings containing the given value.- Parameters:
property
- The property nameexpression
- The expression- Returns:
- An instance of Query.Constains
-
endsWith
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:
property
- The property nameexpression
- The expression- Returns:
- An instance of Query.EndsWith
-
ilike
Deprecated, for removal: This API element is subject to removal in a future version.Case-insensitive like.- Parameters:
property
- The propertyexpression
- The expression- Returns:
- An ILike expression
-
rlike
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property match the given regular expressions.- Parameters:
property
- The property nameexpression
- The expression- Returns:
- An instance of Query.RLike
-
and
Deprecated, for removal: This API element is subject to removal in a future version.Logical OR.- Parameters:
a
- The left criterionb
- The right criterion- Returns:
- The criterion
-
or
Deprecated, for removal: This API element is subject to removal in a future version.Logical OR.- Parameters:
a
- The left criterionb
- The right criterion- Returns:
- The criterion
-
between
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the results by the given property value range.- Parameters:
property
- The name of the propertystart
- The start of the rangeend
- The end of the range- Returns:
- The Between instance
-
gt
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be greater than the given value.- Parameters:
property
- The propertyparameter
- The parameter that provides the value- Returns:
- The GreaterThan instance
-
lt
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be less than the given value.- Parameters:
property
- The propertyparameter
- The parameter that provides the value- Returns:
- The LessThan instance
-
gte
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 LessThan instance
-
lte
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 LessThan instance
-
isNull
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be null.- Parameters:
property
- The property name- Returns:
- The IsNull instance
-
isEmpty
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be empty (such as a blank string or an empty collection).- Parameters:
property
- The property name- Returns:
- The IsEmpty instance
-
isNotEmpty
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be not empty (such as a non-blank string).- Parameters:
property
- The property name- Returns:
- The IsEmpty instance
-
isNotNull
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be null.- Parameters:
property
- The property name- Returns:
- The IsNull instance
-
isTrue
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be true.- Parameters:
property
- The property name- Returns:
- The true instance
-
isFalse
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict a value to be false.- Parameters:
property
- The property name- Returns:
- The true instance
-
sizeEq
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict the size of a collection property.- Parameters:
property
- The propertysize
- The size to restrict- Returns:
- The result
-
sizeGt
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict the size of a collection property to be greater than the given value.- Parameters:
property
- The propertysize
- The size to restrict- Returns:
- The result
-
sizeGe
Deprecated, for removal: This API element is subject to removal in a future version.Used to restrict the size of a collection property to be greater than or equal to the given value.- Parameters:
property
- The propertysize
- The size to restrict- Returns:
- The result
-
sizeLe
Deprecated, for removal: This API element is subject to removal in a future version.Creates a Criterion that contrains a collection property to be less than or equal to the given size.- Parameters:
property
- The property namesize
- The size to constrain by- Returns:
- A Criterion instance
-
sizeLt
Deprecated, for removal: This API element is subject to removal in a future version.Creates a Criterion that contrains a collection property to be less than to the given size.- Parameters:
property
- The property namesize
- The size to constrain by- Returns:
- A Criterion instance
-
sizeNe
Deprecated, for removal: This API element is subject to removal in a future version.Creates a Criterion that contrains a collection property to be not equal to the given size.- Parameters:
property
- The property namesize
- The size to constrain by- Returns:
- A Criterion instance
-
eqProperty
Deprecated, for removal: This API element is subject to removal in a future version.Constraints a property to be equal to a specified other property.- Parameters:
propertyName
- The propertyotherPropertyName
- The other property- Returns:
- The criterion instance
-
neProperty
public static QueryModel.NotEqualsProperty neProperty(String propertyName, String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constraints a property to be not equal to a specified other property.- Parameters:
propertyName
- The propertyotherPropertyName
- The other property- Returns:
- This criterion instance
-
gtProperty
public static QueryModel.GreaterThanProperty gtProperty(String propertyName, String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constraints a property to be greater than a specified other property.- Parameters:
propertyName
- The propertyotherPropertyName
- The other property- Returns:
- The criterion
-
geProperty
public static QueryModel.GreaterThanEqualsProperty geProperty(String propertyName, String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constraints a property to be greater than or equal to a specified other property.- Parameters:
propertyName
- The propertyotherPropertyName
- The other property- Returns:
- The criterion
-
ltProperty
Deprecated, for removal: This API element is subject to removal in a future version.Constraints a property to be less than a specified other property.- Parameters:
propertyName
- The propertyotherPropertyName
- The other property- Returns:
- The criterion
-
leProperty
public static QueryModel.LessThanEqualsProperty leProperty(String propertyName, String otherPropertyName) Deprecated, for removal: This API element is subject to removal in a future version.Constraints a property to be less than or equal to a specified other property.- Parameters:
propertyName
- The propertyotherPropertyName
- The other property- Returns:
- The criterion
-
arrayContains
Deprecated, for removal: This API element is subject to removal in a future version.Restricts the property to be contained in the array.- Parameters:
property
- The propertyparameter
- The parameter that provides the value- Returns:
- An instance of Query.ArrayContains
-