Class Restrictions

java.lang.Object
io.micronaut.data.model.query.factory.Restrictions

@Deprecated(forRemoval=true, since="4.9") public class Restrictions extends Object
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

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Logical OR.
    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.
    between(String property, Object start, Object end)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Restricts the results by the given property value range.
    contains(String property, Object expression)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Restricts the property match to strings containing the given value.
    endsWith(String property, Object expression)
    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.
    eq(String property, Object parameter)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Restricts the property to be equal to the given value.
    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.
    gt(String property, 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 the given value.
    gte(String property, 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.
    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.
    idEq(Object parameter)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Restricts the property to be equal to the given value.
    ilike(String property, Object expression)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Case-insensitive like.
    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.
    in(String property, Object parameter)
    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.
    isEmpty(String property)
    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).
    isFalse(String property)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Used to restrict a value to be false.
    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).
    isNotNull(String property)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Used to restrict a value to be null.
    isNull(String property)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Used to restrict a value to be null.
    isTrue(String property)
    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.
    like(String property, Object expression)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Restricts the property match the given String expressions.
    lt(String property, 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 the given value.
    lte(String property, 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.
    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.
    ne(String property, Object parameter)
    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.
    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.
    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.
    notIn(String property, Object parameter)
    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.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Logical OR.
    regex(String property, Object expression)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Restricts the property match the given regex expressions.
    rlike(String property, Object expression)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Restricts the property match the given regular expressions.
    sizeEq(String property, Object size)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Used to restrict the size of a collection property.
    sizeGe(String property, Object size)
    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.
    sizeGt(String property, Object size)
    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.
    sizeLe(String property, Object size)
    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.
    sizeLt(String property, Object size)
    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.
    sizeNe(String property, Object size)
    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.
    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.
    versionEq(Object parameter)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Restricts the property to be equal to the given value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Restrictions

      public Restrictions()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • eq

      public static QueryModel.Equals eq(String property, Object parameter)
      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 property
      parameter - The parameter that provides the value
      Returns:
      An instance of Query.Equals
    • idEq

      public static QueryModel.IdEquals idEq(Object parameter)
      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

      public static QueryModel.VersionEquals versionEq(Object parameter)
      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

      public static QueryModel.NotEquals ne(String property, Object parameter)
      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 property
      parameter - The parameter that provides the value
      Returns:
      An instance of Query.Equals
    • in

      public static QueryModel.In in(String property, Object parameter)
      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 property
      parameter - The parameter that provides the value
      Returns:
      An instance of Query.In
    • notIn

      public static QueryModel.NotIn notIn(String property, Object parameter)
      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 property
      parameter - The parameter that provides the value
      Returns:
      An instance of Query.In
    • in

      public 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.
      Parameters:
      property - The property
      subquery - The subquery
      Returns:
      An instance of Query.In
    • notIn

      public 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.
      Parameters:
      property - The property
      subquery - The subquery
      Returns:
      An instance of Query.In
    • like

      public static QueryModel.Like like(String property, Object expression)
      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 name
      expression - The expression
      Returns:
      An instance of Query.Like
    • regex

      public static QueryModel.Regex regex(String property, Object expression)
      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 name
      expression - The expression
      Returns:
      An instance of Query.Like
    • startsWith

      public 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.
      Parameters:
      property - The property name
      expression - The expression
      Returns:
      An instance of Query.StartsWith
    • contains

      public static QueryModel.Contains contains(String property, Object expression)
      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 name
      expression - The expression
      Returns:
      An instance of Query.Constains
    • endsWith

      public static QueryModel.EndsWith endsWith(String property, Object expression)
      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 name
      expression - The expression
      Returns:
      An instance of Query.EndsWith
    • ilike

      public static QueryModel.ILike ilike(String property, Object expression)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Case-insensitive like.
      Parameters:
      property - The property
      expression - The expression
      Returns:
      An ILike expression
    • rlike

      public static QueryModel.RLike rlike(String property, Object expression)
      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 name
      expression - 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 criterion
      b - 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 criterion
      b - The right criterion
      Returns:
      The criterion
    • between

      public static QueryModel.Between between(String property, Object start, Object end)
      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 property
      start - The start of the range
      end - The end of the range
      Returns:
      The Between instance
    • gt

      public static QueryModel.GreaterThan gt(String property, 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 the given value.
      Parameters:
      property - The property
      parameter - The parameter that provides the value
      Returns:
      The GreaterThan instance
    • lt

      public static QueryModel.LessThan lt(String property, 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 the given value.
      Parameters:
      property - The property
      parameter - The parameter that provides the value
      Returns:
      The LessThan instance
    • gte

      public static QueryModel.GreaterThanEquals gte(String property, 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 property
      parameter - The parameter that provides the value
      Returns:
      The LessThan instance
    • lte

      public static QueryModel.LessThanEquals lte(String property, 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 property
      parameter - The parameter that provides the value
      Returns:
      The LessThan instance
    • isNull

      public static QueryModel.IsNull isNull(String property)
      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

      public static QueryModel.IsEmpty isEmpty(String property)
      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

      public 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).
      Parameters:
      property - The property name
      Returns:
      The IsEmpty instance
    • isNotNull

      public static QueryModel.IsNotNull isNotNull(String property)
      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

      public static QueryModel.IsTrue isTrue(String property)
      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

      public static QueryModel.IsFalse isFalse(String property)
      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

      public static QueryModel.SizeEquals sizeEq(String property, Object size)
      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 property
      size - The size to restrict
      Returns:
      The result
    • sizeGt

      public static QueryModel.SizeGreaterThan sizeGt(String property, Object size)
      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 property
      size - The size to restrict
      Returns:
      The result
    • sizeGe

      public static QueryModel.SizeGreaterThanEquals sizeGe(String property, Object size)
      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 property
      size - The size to restrict
      Returns:
      The result
    • sizeLe

      public static QueryModel.SizeLessThanEquals sizeLe(String property, Object size)
      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 name
      size - The size to constrain by
      Returns:
      A Criterion instance
    • sizeLt

      public static QueryModel.SizeLessThan sizeLt(String property, Object size)
      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 name
      size - The size to constrain by
      Returns:
      A Criterion instance
    • sizeNe

      public static QueryModel.SizeNotEquals sizeNe(String property, Object size)
      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 name
      size - The size to constrain by
      Returns:
      A Criterion instance
    • eqProperty

      public 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.
      Parameters:
      propertyName - The property
      otherPropertyName - 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 property
      otherPropertyName - 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 property
      otherPropertyName - 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 property
      otherPropertyName - The other property
      Returns:
      The criterion
    • ltProperty

      public 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.
      Parameters:
      propertyName - The property
      otherPropertyName - 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 property
      otherPropertyName - The other property
      Returns:
      The criterion
    • arrayContains

      public 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.
      Parameters:
      property - The property
      parameter - The parameter that provides the value
      Returns:
      An instance of Query.ArrayContains