Class Restrictions
java.lang.Object
io.micronaut.data.model.query.factory.Restrictions
Factory for creating criterion instances.
- Since:
- 1.0
- Author:
- graemerocher
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic QueryModel.CriterionLogical OR.static QueryModel.ArrayContainsarrayContains(String property, Object parameter) Restricts the property to be contained in the array.static QueryModel.BetweenRestricts the results by the given property value range.static QueryModel.ContainsRestricts the property match to strings containing the given value.static QueryModel.EndsWithRestricts the property match to strings ending with the given value.static QueryModel.EqualsRestricts the property to be equal to the given value.static QueryModel.EqualsPropertyeqProperty(String propertyName, String otherPropertyName) Constraints a property to be equal to a specified other property.geProperty(String propertyName, String otherPropertyName) Constraints a property to be greater than or equal to a specified other property.static QueryModel.GreaterThanUsed to restrict a value to be greater than the given value.static QueryModel.GreaterThanEqualsUsed to restrict a value to be greater than or equal to the given value.gtProperty(String propertyName, String otherPropertyName) Constraints a property to be greater than a specified other property.static QueryModel.IdEqualsRestricts the property to be equal to the given value.static QueryModel.ILikeCase insensitive like.static QueryModel.Inin(String property, QueryModel subquery) Restricts the property to be in the list of given values.static QueryModel.InRestricts the property to be in the list of given values.static QueryModel.IsEmptyUsed to restrict a value to be empty (such as a blank string or an empty collection).static QueryModel.IsFalseUsed to restrict a value to be false.static QueryModel.IsNotEmptyisNotEmpty(String property) Used to restrict a value to be not empty (such as a non-blank string).static QueryModel.IsNotNullUsed to restrict a value to be null.static QueryModel.IsNullUsed to restrict a value to be null.static QueryModel.IsTrueUsed to restrict a value to be true.leProperty(String propertyName, String otherPropertyName) Constraints a property to be less than or equal to a specified other property.static QueryModel.LikeRestricts the property match the given String expressions.static QueryModel.LessThanUsed to restrict a value to be less than the given value.static QueryModel.LessThanEqualsUsed to restrict a value to be less than or equal to the given value.static QueryModel.LessThanPropertyltProperty(String propertyName, String otherPropertyName) Constraints a property to be less than a specified other property.static QueryModel.NotEqualsRestricts the property to be not equal to the given value.static QueryModel.NotEqualsPropertyneProperty(String propertyName, String otherPropertyName) Constraints a property to be not equal to a specified other property.static QueryModel.NotInnotIn(String property, QueryModel subquery) Restricts the property to be in the list of given values.static QueryModel.NotInRestricts the property to not be in the list of given values.static QueryModel.CriterionLogical OR.static QueryModel.RegexRestricts the property match the given regex expressions.static QueryModel.RLikeRestricts the property match the given regular expressions.static QueryModel.SizeEqualsUsed to restrict the size of a collection property.Used to restrict the size of a collection property to be greater than or equal to the given value.static QueryModel.SizeGreaterThanUsed to restrict the size of a collection property to be greater than the given value.Creates a Criterion that contrains a collection property to be less than or equal to the given size.static QueryModel.SizeLessThanCreates a Criterion that contrains a collection property to be less than to the given size.static QueryModel.SizeNotEqualsCreates a Criterion that contrains a collection property to be not equal to the given size.static QueryModel.StartsWithstartsWith(String property, Object expression) Restricts the property match to strings starting with the given value.static QueryModel.VersionEqualsRestricts the property to be equal to the given value.
- 
Constructor Details- 
Restrictionspublic Restrictions()
 
- 
- 
Method Details- 
eqRestricts the property to be equal to the given value.- Parameters:
- property- The property
- parameter- The parameter that provides the value
- Returns:
- An instance of Query.Equals
 
- 
idEqRestricts the property to be equal to the given value.- Parameters:
- parameter- The parameter that provides the value
- Returns:
- An instance of Query.Equals
 
- 
versionEqRestricts the property to be equal to the given value.- Parameters:
- parameter- The parameter that provides the value
- Returns:
- An instance of Query.Equals
 
- 
neRestricts the property to be not equal to the given value.- Parameters:
- property- The property
- parameter- The parameter that provides the value
- Returns:
- An instance of Query.Equals
 
- 
inRestricts the property to be in the list of given values.- Parameters:
- property- The property
- parameter- The parameter that provides the value
- Returns:
- An instance of Query.In
 
- 
notInRestricts the property to not be in the list of given values.- Parameters:
- property- The property
- parameter- The parameter that provides the value
- Returns:
- An instance of Query.In
 
- 
inRestricts the property to be in the list of given values.- Parameters:
- property- The property
- subquery- The subquery
- Returns:
- An instance of Query.In
 
- 
notInRestricts the property to be in the list of given values.- Parameters:
- property- The property
- subquery- The subquery
- Returns:
- An instance of Query.In
 
- 
likeRestricts the property match the given String expressions. Expressions use SQL-like % to denote wildcards- Parameters:
- property- The property name
- expression- The expression
- Returns:
- An instance of Query.Like
 
- 
regexRestricts the property match the given regex expressions.- Parameters:
- property- The property name
- expression- The expression
- Returns:
- An instance of Query.Like
 
- 
startsWithRestricts the property match to strings starting with the given value.- Parameters:
- property- The property name
- expression- The expression
- Returns:
- An instance of Query.StartsWith
 
- 
containsRestricts the property match to strings containing the given value.- Parameters:
- property- The property name
- expression- The expression
- Returns:
- An instance of Query.Constains
 
- 
endsWithRestricts the property match to strings ending with the given value.- Parameters:
- property- The property name
- expression- The expression
- Returns:
- An instance of Query.EndsWith
 
- 
ilikeCase insensitive like.- Parameters:
- property- The property
- expression- The expression
- Returns:
- An ILike expression
 
- 
rlikeRestricts the property match the given regular expressions.- Parameters:
- property- The property name
- expression- The expression
- Returns:
- An instance of Query.RLike
 
- 
andLogical OR.- Parameters:
- a- The left criterion
- b- The right criterion
- Returns:
- The criterion
 
- 
orLogical OR.- Parameters:
- a- The left criterion
- b- The right criterion
- Returns:
- The criterion
 
- 
betweenRestricts the results by the given property value range.- Parameters:
- property- The name of the property
- start- The start of the range
- end- The end of the range
- Returns:
- The Between instance
 
- 
gtUsed to restrict a value to be greater than the given value.- Parameters:
- property- The property
- parameter- The parameter that provides the value
- Returns:
- The GreaterThan instance
 
- 
ltUsed to restrict a value to be less than the given value.- Parameters:
- property- The property
- parameter- The parameter that provides the value
- Returns:
- The LessThan instance
 
- 
gteUsed to restrict a value to be greater than or equal to the given value.- Parameters:
- property- The property
- parameter- The parameter that provides the value
- Returns:
- The LessThan instance
 
- 
lteUsed to restrict a value to be less than or equal to the given value.- Parameters:
- property- The property
- parameter- The parameter that provides the value
- Returns:
- The LessThan instance
 
- 
isNullUsed to restrict a value to be null.- Parameters:
- property- The property name
- Returns:
- The IsNull instance
 
- 
isEmptyUsed 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
 
- 
isNotEmptyUsed to restrict a value to be not empty (such as a non-blank string).- Parameters:
- property- The property name
- Returns:
- The IsEmpty instance
 
- 
isNotNullUsed to restrict a value to be null.- Parameters:
- property- The property name
- Returns:
- The IsNull instance
 
- 
isTrueUsed to restrict a value to be true.- Parameters:
- property- The property name
- Returns:
- The true instance
 
- 
isFalseUsed to restrict a value to be false.- Parameters:
- property- The property name
- Returns:
- The true instance
 
- 
sizeEqUsed to restrict the size of a collection property.- Parameters:
- property- The property
- size- The size to restrict
- Returns:
- The result
 
- 
sizeGtUsed to restrict the size of a collection property to be greater than the given value.- Parameters:
- property- The property
- size- The size to restrict
- Returns:
- The result
 
- 
sizeGeUsed to restrict the size of a collection property to be greater than or equal to the given value.- Parameters:
- property- The property
- size- The size to restrict
- Returns:
- The result
 
- 
sizeLeCreates a Criterion that contrains a collection property to be less than or equal to the given size.- Parameters:
- property- The property name
- size- The size to constrain by
- Returns:
- A Criterion instance
 
- 
sizeLtCreates a Criterion that contrains a collection property to be less than to the given size.- Parameters:
- property- The property name
- size- The size to constrain by
- Returns:
- A Criterion instance
 
- 
sizeNeCreates a Criterion that contrains a collection property to be not equal to the given size.- Parameters:
- property- The property name
- size- The size to constrain by
- Returns:
- A Criterion instance
 
- 
eqPropertyConstraints a property to be equal to a specified other property.- Parameters:
- propertyName- The property
- otherPropertyName- The other property
- Returns:
- The criterion instance
 
- 
nePropertypublic static QueryModel.NotEqualsProperty neProperty(String propertyName, String otherPropertyName) Constraints a property to be not equal to a specified other property.- Parameters:
- propertyName- The property
- otherPropertyName- The other property
- Returns:
- This criterion instance
 
- 
gtPropertypublic static QueryModel.GreaterThanProperty gtProperty(String propertyName, String otherPropertyName) Constraints a property to be greater than a specified other property.- Parameters:
- propertyName- The property
- otherPropertyName- The other property
- Returns:
- The criterion
 
- 
gePropertypublic static QueryModel.GreaterThanEqualsProperty geProperty(String propertyName, String otherPropertyName) Constraints a property to be greater than or equal to a specified other property.- Parameters:
- propertyName- The property
- otherPropertyName- The other property
- Returns:
- The criterion
 
- 
ltPropertyConstraints a property to be less than a specified other property.- Parameters:
- propertyName- The property
- otherPropertyName- The other property
- Returns:
- The criterion
 
- 
lePropertypublic static QueryModel.LessThanEqualsProperty leProperty(String propertyName, String otherPropertyName) Constraints a property to be less than or equal to a specified other property.- Parameters:
- propertyName- The property
- otherPropertyName- The other property
- Returns:
- The criterion
 
- 
arrayContainsRestricts the property to be contained in the array.- Parameters:
- property- The property
- parameter- The parameter that provides the value
- Returns:
- An instance of Query.ArrayContains
 
 
-