public class Restrictions extends Object
Factory for creating org.grails.datastore.mapping.query.Query.Criterion instances
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static Criterion |
and(Criterion a, Criterion b) |
|
public static Between |
between(String property, Object start, Object end)Restricts the results by the given property value range |
|
public static Equals |
eq(String property, Object value)Restricts the property to be equal to the given value |
|
public static EqualsProperty |
eqProperty(String propertyName, String otherPropertyName)Constraints a property to be equal to a specified other property |
|
public static GreaterThanEqualsProperty |
geProperty(String propertyName, String otherPropertyName)Constraints a property to be greater than or equal to a specified other property |
|
public static GreaterThan |
gt(String property, Object value)Used to restrict a value to be greater than the given value |
|
public static GreaterThanProperty |
gtProperty(String propertyName, String otherPropertyName)Constraints a property to be greater than a specified other property |
|
public static GreaterThanEquals |
gte(String property, Object value)Used to restrict a value to be greater than or equal to the given value |
|
public static IdEquals |
idEq(Object value)Restricts the property to be equal to the given value |
|
public static ILike |
ilike(String property, String expression)Case insensitive like |
|
public static In |
in(String property, Collection<?> values)Restricts the property to be in the list of given values |
|
public static In |
in(String property, QueryableCriteria subquery)Restricts the property to be in the list of given values |
|
public static IsEmpty |
isEmpty(String property)Used to restrict a value to be empty (such as a blank string or an empty collection) |
|
public static IsNotEmpty |
isNotEmpty(String property)Used to restrict a value to be not empty (such as a non-blank string) |
|
public static IsNotNull |
isNotNull(String property)Used to restrict a value to be null |
|
public static IsNull |
isNull(String property)Used to restrict a value to be null |
|
public static LessThanEqualsProperty |
leProperty(String propertyName, String otherPropertyName)Constraints a property to be less than or equal to a specified other property |
|
public static Like |
like(String property, String expression)Restricts the property match the given String expressions. |
|
public static LessThan |
lt(String property, Object value)Used to restrict a value to be less than the given value |
|
public static LessThanProperty |
ltProperty(String propertyName, String otherPropertyName)Constraints a property to be less than a specified other property |
|
public static LessThanEquals |
lte(String property, Object value)Used to restrict a value to be less than or equal to the given value |
|
public static NotEquals |
ne(String property, Object value) |
|
public static NotEqualsProperty |
neProperty(String propertyName, String otherPropertyName)Constraints a property to be not equal to a specified other property |
|
public static NotIn |
notIn(String property, QueryableCriteria subquery)Restricts the property to be in the list of given values |
|
public static Criterion |
or(Criterion a, Criterion b) |
|
public static RLike |
rlike(String property, String expression)Restricts the property match the given regular expressions. |
|
public static SizeEquals |
sizeEq(String property, int size)Used to restrict the size of a collection property |
|
public static SizeGreaterThanEquals |
sizeGe(String property, int size)Used to restrict the size of a collection property to be greater than or equal to the given value |
|
public static SizeGreaterThan |
sizeGt(String property, int size)Used to restrict the size of a collection property to be greater than the given value |
|
public static SizeLessThanEquals |
sizeLe(String property, int size)Creates a Criterion that contrains a collection property to be less than or equal to the given size |
|
public static SizeLessThan |
sizeLt(String property, int size)Creates a Criterion that contrains a collection property to be less than to the given size |
|
public static SizeNotEquals |
sizeNe(String property, int size)Creates a Criterion that contrains a collection property to be not equal to the given size |
Restricts the results by the given property value range
property - The name of the propertystart - The start of the rangeend - The end of the rangeRestricts the property to be equal to the given value
property - The propertyvalue - The valueConstraints a property to be equal to a specified other property
propertyName - The propertyotherPropertyName - The other propertyConstraints a property to be greater than or equal to a specified other property
propertyName - The propertyotherPropertyName - The other propertyUsed to restrict a value to be greater than the given value
property - The propertyvalue - The valueConstraints a property to be greater than a specified other property
propertyName - The propertyotherPropertyName - The other propertyUsed to restrict a value to be greater than or equal to the given value
property - The propertyvalue - The valueRestricts the property to be equal to the given value
value - The valueCase insensitive like
property - The propertyexpression - The expressionRestricts the property to be in the list of given values
property - The propertyvalues - The valuesRestricts the property to be in the list of given values
property - The propertysubquery - The subqueryUsed to restrict a value to be empty (such as a blank string or an empty collection)
property - The property nameUsed to restrict a value to be not empty (such as a non-blank string)
property - The property nameUsed to restrict a value to be null
property - The property nameUsed to restrict a value to be null
property - The property nameConstraints a property to be less than or equal to a specified other property
propertyName - The propertyotherPropertyName - The other propertyRestricts the property match the given String expressions. Expressions use SQL-like % to denote wildcards
property - The property nameexpression - The expressionUsed to restrict a value to be less than the given value
property - The propertyvalue - The valueConstraints a property to be less than a specified other property
propertyName - The propertyotherPropertyName - The other propertyUsed to restrict a value to be less than or equal to the given value
property - The propertyvalue - The valueConstraints a property to be not equal to a specified other property
propertyName - The propertyotherPropertyName - The other propertyRestricts the property to be in the list of given values
property - The propertysubquery - The subqueryRestricts the property match the given regular expressions.
property - The property nameexpression - The expressionUsed to restrict the size of a collection property
property - The propertysize - The size to restrictUsed to restrict the size of a collection property to be greater than or equal to the given value
property - The propertysize - The size to restrictUsed to restrict the size of a collection property to be greater than the given value
property - The propertysize - The size to restrictCreates a Criterion that contrains a collection property to be less than or equal to the given size
property - The property namesize - The size to constrain byCreates a Criterion that contrains a collection property to be less than to the given size
property - The property namesize - The size to constrain byCreates a Criterion that contrains a collection property to be not equal to the given size
property - The property namesize - The size to constrain by