public class Restrictions extends java.lang.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(java.lang.String property, java.lang.Object start, java.lang.Object end) Restricts the results by the given property value range |
|
public static Equals |
eq(java.lang.String property, java.lang.Object value) Restricts the property to be equal to the given value |
|
public static EqualsProperty |
eqProperty(java.lang.String propertyName, java.lang.String otherPropertyName) Constraints a property to be equal to a specified other property |
|
public static GreaterThanEqualsProperty |
geProperty(java.lang.String propertyName, java.lang.String otherPropertyName) Constraints a property to be greater than or equal to a specified other property |
|
public static GreaterThan |
gt(java.lang.String property, java.lang.Object value) Used to restrict a value to be greater than the given value |
|
public static GreaterThanProperty |
gtProperty(java.lang.String propertyName, java.lang.String otherPropertyName) Constraints a property to be greater than a specified other property |
|
public static GreaterThanEquals |
gte(java.lang.String property, java.lang.Object value) Used to restrict a value to be greater than or equal to the given value |
|
public static IdEquals |
idEq(java.lang.Object value) Restricts the property to be equal to the given value |
|
public static ILike |
ilike(java.lang.String property, java.lang.String expression) Case insensitive like |
|
public static In |
in(java.lang.String property, java.util.Collection<?> values) Restricts the property to be in the list of given values |
|
public static In |
in(java.lang.String property, QueryableCriteria subquery) Restricts the property to be in the list of given values |
|
public static IsEmpty |
isEmpty(java.lang.String property) Used to restrict a value to be empty (such as a blank string or an empty collection) |
|
public static IsNotEmpty |
isNotEmpty(java.lang.String property) Used to restrict a value to be not empty (such as a non-blank string) |
|
public static IsNotNull |
isNotNull(java.lang.String property) Used to restrict a value to be null |
|
public static IsNull |
isNull(java.lang.String property) Used to restrict a value to be null |
|
public static LessThanEqualsProperty |
leProperty(java.lang.String propertyName, java.lang.String otherPropertyName) Constraints a property to be less than or equal to a specified other property |
|
public static Like |
like(java.lang.String property, java.lang.String expression) Restricts the property match the given String expressions. |
|
public static LessThan |
lt(java.lang.String property, java.lang.Object value) Used to restrict a value to be less than the given value |
|
public static LessThanProperty |
ltProperty(java.lang.String propertyName, java.lang.String otherPropertyName) Constraints a property to be less than a specified other property |
|
public static LessThanEquals |
lte(java.lang.String property, java.lang.Object value) Used to restrict a value to be less than or equal to the given value |
|
public static NotEquals |
ne(java.lang.String property, java.lang.Object value) |
|
public static NotEqualsProperty |
neProperty(java.lang.String propertyName, java.lang.String otherPropertyName) Constraints a property to be not equal to a specified other property |
|
public static NotIn |
notIn(java.lang.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(java.lang.String property, java.lang.String expression) Restricts the property match the given regular expressions. |
|
public static SizeEquals |
sizeEq(java.lang.String property, int size) Used to restrict the size of a collection property |
|
public static SizeGreaterThanEquals |
sizeGe(java.lang.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(java.lang.String property, int size) Used to restrict the size of a collection property to be greater than the given value |
|
public static SizeLessThanEquals |
sizeLe(java.lang.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(java.lang.String property, int size) Creates a Criterion that contrains a collection property to be less than to the given size |
|
public static SizeNotEquals |
sizeNe(java.lang.String property, int size) Creates a Criterion that contrains a collection property to be not equal to the given size |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
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