public abstract class AbstractCriteriaBuilder extends groovy.lang.GroovyObjectSupport
Abstract criteria builder implementation
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
ORDER_ASCENDING |
|
static java.lang.String |
ORDER_DESCENDING |
|
protected static java.lang.String |
ROOT_CALL |
|
protected static java.lang.String |
ROOT_DO_CALL |
|
protected static java.lang.String |
SCROLL_CALL |
|
protected java.util.List<Query.Order> |
orderEntries |
|
protected boolean |
paginationEnabledList |
|
protected PersistentEntity |
persistentEntity |
|
protected ProjectionList |
projectionList |
|
protected Query |
query |
|
protected QueryCreator |
queryCreator |
|
protected groovy.lang.MetaObjectProtocol |
queryMetaClass |
|
protected boolean |
readOnly |
|
protected java.lang.Class |
targetClass |
|
protected boolean |
uniqueResult |
Constructor and description |
---|
AbstractCriteriaBuilder
(java.lang.Class targetClass, QueryCreator queryCreator, MappingContext mappingContext) |
Type Params | Return Type | Name and description |
---|---|---|
|
protected Criterion |
addToCriteria(Criterion c) |
|
Criteria |
allEq(java.util.Map<java.lang.String, java.lang.Object> propertyValues) Apply an "equals" constraint to each property in the key set of a Map |
|
Criteria |
and(groovy.lang.Closure callable) |
|
ProjectionList |
avg(java.lang.String name) Computes the average value of a property |
|
Criteria |
between(java.lang.String propertyName, java.lang.Object start, java.lang.Object finish) Restricts the results by the given property value range (inclusive) |
|
void |
build(groovy.lang.Closure criteria) |
|
Criteria |
cache(boolean cache) |
|
ProjectionList |
count() Count the number of records returned |
|
ProjectionList |
countDistinct(java.lang.String property) Projection that signifies to count distinct results |
|
ProjectionList |
distinct() Projection that signifies to return only distinct results |
|
ProjectionList |
distinct(java.lang.String property) Projection that signifies to return only distinct results |
|
protected void |
ensureQueryIsInitialized() |
|
Criteria |
eq(java.lang.String propertyName, java.lang.Object propertyValue) Creates an "equals" Criterion based on the specified property name and value. |
|
Criteria |
eqAll(java.lang.String propertyName, groovy.lang.Closure propertyValue) Creates a subquery criterion that ensures the given property is equal to all the given returned values |
|
Criteria |
eqAll(java.lang.String propertyName, QueryableCriteria propertyValue) Creates a subquery criterion that ensures the given property is equal to all the given returned values |
|
Criteria |
eqProperty(java.lang.String propertyName, java.lang.String otherPropertyName) Constraints a property to be equal to a specified other property |
|
Criteria |
exists(QueryableCriteria<?> subquery) |
|
Criteria |
ge(java.lang.String property, java.lang.Object value) Used to restrict a value to be greater than or equal to the given value |
|
Criteria |
geAll(java.lang.String propertyName, groovy.lang.Closure propertyValue) Creates a subquery criterion that ensures the given property is greater than all the given returned values |
|
Criteria |
geAll(java.lang.String propertyName, QueryableCriteria propertyValue) Creates a subquery criterion that ensures the given property is greater than all the given returned values |
|
Criteria |
geProperty(java.lang.String propertyName, java.lang.String otherPropertyName) Constraints a property to be greater than or equal to a specified other property |
|
Criteria |
geSome(java.lang.String propertyName, QueryableCriteria propertyValue) |
|
Criteria |
geSome(java.lang.String propertyName, groovy.lang.Closure<?> propertyValue) |
|
Query |
getQuery() |
|
java.lang.Class |
getTargetClass() |
|
ProjectionList |
groupProperty(java.lang.String property) Defines a group by projection for datastores that support it |
|
Criteria |
gt(java.lang.String property, java.lang.Object value) Used to restrict a value to be greater than or equal to the given value |
|
Criteria |
gtAll(java.lang.String propertyName, groovy.lang.Closure propertyValue) Creates a subquery criterion that ensures the given property is greater than all the given returned values |
|
Criteria |
gtAll(java.lang.String propertyName, QueryableCriteria propertyValue) Creates a subquery criterion that ensures the given property is greater than all the given returned values |
|
Criteria |
gtProperty(java.lang.String propertyName, java.lang.String otherPropertyName) Constraints a property to be greater than a specified other property |
|
Criteria |
gtSome(java.lang.String propertyName, QueryableCriteria propertyValue) |
|
Criteria |
gtSome(java.lang.String propertyName, groovy.lang.Closure<?> propertyValue) |
|
Criteria |
gte(java.lang.String property, java.lang.Object value) Used to restrict a value to be greater than or equal to the given value |
|
ProjectionList |
id() |
|
Criteria |
idEq(java.lang.Object propertyValue) Creates an "equals" Criterion based on the specified property name and value. |
|
Criteria |
idEquals(java.lang.Object value) |
|
Criteria |
ilike(java.lang.String propertyName, java.lang.Object propertyValue) Creates an ilike Criterion based on the specified property name and value. |
|
Criteria |
in(java.lang.String propertyName, QueryableCriteria<?> subquery) |
|
Criteria |
in(java.lang.String propertyName, groovy.lang.Closure<?> subquery) |
|
Criteria |
in(java.lang.String propertyName, java.util.Collection values) Creates an "in" Criterion based on the specified property name and list of values. |
|
Criteria |
in(java.lang.String propertyName, java.lang.Object[] values) Creates an "in" Criterion based on the specified property name and list of values. |
|
Criteria |
inList(java.lang.String propertyName, QueryableCriteria<?> subquery) |
|
Criteria |
inList(java.lang.String propertyName, groovy.lang.Closure<?> subquery) |
|
Criteria |
inList(java.lang.String propertyName, java.util.Collection values) Creates an "in" Criterion based on the specified property name and list of values. |
|
Criteria |
inList(java.lang.String propertyName, java.lang.Object[] values) Creates an "in" Criterion based on the specified property name and list of values. |
|
protected void |
invokeClosureNode(java.lang.Object args) |
|
protected java.lang.Object |
invokeList() |
|
java.lang.Object |
invokeMethod(java.lang.String name, java.lang.Object obj) |
|
Criteria |
isEmpty(java.lang.String propertyName) |
|
Criteria |
isNotEmpty(java.lang.String propertyName) |
|
Criteria |
isNotNull(java.lang.String propertyName) |
|
Criteria |
isNull(java.lang.String propertyName) |
|
Criteria |
join(java.lang.String property) |
|
Criteria |
le(java.lang.String property, java.lang.Object value) Used to restrict a value to be less than or equal to the given value |
|
Criteria |
leAll(java.lang.String propertyName, groovy.lang.Closure propertyValue) Creates a subquery criterion that ensures the given property is less than all the given returned values |
|
Criteria |
leAll(java.lang.String propertyName, QueryableCriteria propertyValue) Creates a subquery criterion that ensures the given property is less than all the given returned values |
|
Criteria |
leProperty(java.lang.String propertyName, java.lang.String otherPropertyName) Constraints a property to be less than or equal to a specified other property |
|
Criteria |
leSome(java.lang.String propertyName, QueryableCriteria propertyValue) |
|
Criteria |
leSome(java.lang.String propertyName, groovy.lang.Closure<?> propertyValue) |
|
Criteria |
like(java.lang.String propertyName, java.lang.Object propertyValue) Creates an like Criterion based on the specified property name and value. |
|
Criteria |
lt(java.lang.String property, java.lang.Object value) Used to restrict a value to be less than or equal to the given value |
|
Criteria |
ltAll(java.lang.String propertyName, groovy.lang.Closure propertyValue) Creates a subquery criterion that ensures the given property is less than all the given returned values |
|
Criteria |
ltAll(java.lang.String propertyName, QueryableCriteria propertyValue) Creates a subquery criterion that ensures the given property is less than all the given returned values |
|
Criteria |
ltProperty(java.lang.String propertyName, java.lang.String otherPropertyName) Constraints a property to be less than a specified other property |
|
Criteria |
ltSome(java.lang.String propertyName, QueryableCriteria propertyValue) |
|
Criteria |
ltSome(java.lang.String propertyName, groovy.lang.Closure<?> propertyValue) |
|
Criteria |
lte(java.lang.String property, java.lang.Object value) Used to restrict a value to be less than or equal to the given value |
|
ProjectionList |
max(java.lang.String name) Computes the max value of a property |
|
ProjectionList |
min(java.lang.String name) Computes the min value of a property |
|
Criteria |
ne(java.lang.String propertyName, java.lang.Object propertyValue) Creates a "not equals" Criterion based on the specified property name and value. |
|
Criteria |
neProperty(java.lang.String propertyName, java.lang.String otherPropertyName) Constraints a property to be not equal to a specified other property |
|
Criteria |
not(groovy.lang.Closure callable) |
|
Criteria |
notExists(QueryableCriteria<?> subquery) |
|
Criteria |
notIn(java.lang.String propertyName, QueryableCriteria<?> subquery) |
|
Criteria |
notIn(java.lang.String propertyName, groovy.lang.Closure<?> subquery) |
|
Criteria |
or(groovy.lang.Closure callable) |
|
Criteria |
order(java.lang.String propertyName) Orders by the specified property name (defaults to ascending) |
|
Criteria |
order(Order o) Orders by the specified property name (defaults to ascending) |
|
Criteria |
order(java.lang.String propertyName, java.lang.String direction) Orders by the specified property name and direction |
|
ProjectionList |
projections(groovy.lang.Closure callable) Defines projections |
|
ProjectionList |
property(java.lang.String name) A projection that obtains the value of a property of an entity |
|
Criteria |
readOnly(boolean readOnly) |
|
Criteria |
rlike(java.lang.String propertyName, java.lang.Object propertyValue) Creates an rlike Criterion based on the specified property name and value. |
|
ProjectionList |
rowCount() Count the number of records returned |
|
Criteria |
select(java.lang.String property) |
|
void |
setUniqueResult(boolean uniqueResult) |
|
Criteria |
sizeEq(java.lang.String propertyName, int size) |
|
Criteria |
sizeGe(java.lang.String propertyName, int size) |
|
Criteria |
sizeGt(java.lang.String propertyName, int size) |
|
Criteria |
sizeLe(java.lang.String propertyName, int size) |
|
Criteria |
sizeLt(java.lang.String propertyName, int size) |
|
Criteria |
sizeNe(java.lang.String propertyName, int size) |
|
ProjectionList |
sum(java.lang.String name) Computes the sum of a property |
|
protected void |
validatePropertyName(java.lang.String propertyName, java.lang.String methodName) |
Methods inherited from class | Name |
---|---|
class groovy.lang.GroovyObjectSupport |
groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll() |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), 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() |
Apply an "equals" constraint to each property in the key set of a Map
propertyValues
- a map from property names to valuesComputes the average value of a property
name
- The name of the propertyRestricts the results by the given property value range (inclusive)
propertyName
- The property namestart
- The start of the rangefinish
- The end of the rangeCount the number of records returned
Projection that signifies to count distinct results
property
- The name of the propertyProjection that signifies to return only distinct results
Projection that signifies to return only distinct results
property
- The name of the propertyCreates an "equals" Criterion based on the specified property name and value.
propertyName
- The property namepropertyValue
- The property valueCreates a subquery criterion that ensures the given property is equal to all the given returned values
propertyName
- The property namepropertyValue
- The property valueCreates a subquery criterion that ensures the given property is equal to all the given returned values
propertyName
- The property namepropertyValue
- The property valueConstraints a property to be equal to 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 valueCreates a subquery criterion that ensures the given property is greater than all the given returned values
propertyName
- The property namepropertyValue
- The property valueCreates a subquery criterion that ensures the given property is greater than all the given returned values
propertyName
- The property namepropertyValue
- The property valueConstraints a property to be greater than or equal to a specified other property
propertyName
- The propertyotherPropertyName
- The other propertyDefines a group by projection for datastores that support it
property
- The property nameUsed to restrict a value to be greater than or equal to the given value
property
- The propertyvalue
- The valueCreates a subquery criterion that ensures the given property is greater than all the given returned values
propertyName
- The property namepropertyValue
- The property valueCreates a subquery criterion that ensures the given property is greater than all the given returned values
propertyName
- The property namepropertyValue
- The property 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 valueCreates an "equals" Criterion based on the specified property name and value.
propertyValue
- The property valueCreates an ilike Criterion based on the specified property name and value. Unlike a like condition, ilike is case insensitive
propertyName
- The property namepropertyValue
- The property valueCreates an "in" Criterion based on the specified property name and list of values.
propertyName
- The property namevalues
- The valuesCreates an "in" Criterion based on the specified property name and list of values.
propertyName
- The property namevalues
- The valuesCreates an "in" Criterion based on the specified property name and list of values.
propertyName
- The property namevalues
- The valuesCreates an "in" Criterion based on the specified property name and list of values.
propertyName
- The property namevalues
- The valuesUsed to restrict a value to be less than or equal to the given value
property
- The propertyvalue
- The valueCreates a subquery criterion that ensures the given property is less than all the given returned values
propertyName
- The property namepropertyValue
- The property valueCreates a subquery criterion that ensures the given property is less than all the given returned values
propertyName
- The property namepropertyValue
- The property valueConstraints a property to be less than or equal to a specified other property
propertyName
- The propertyotherPropertyName
- The other propertyCreates an like Criterion based on the specified property name and value.
propertyName
- The property namepropertyValue
- The property valueUsed to restrict a value to be less than or equal to the given value
property
- The propertyvalue
- The valueCreates a subquery criterion that ensures the given property is less than all the given returned values
propertyName
- The property namepropertyValue
- The property valueCreates a subquery criterion that ensures the given property is less than all the given returned values
propertyName
- The property namepropertyValue
- The property 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 valueComputes the max value of a property
name
- The name of the propertyComputes the min value of a property
name
- The name of the propertyCreates a "not equals" Criterion based on the specified property name and value.
propertyName
- The property namepropertyValue
- The property valueConstraints a property to be not equal to a specified other property
propertyName
- The propertyotherPropertyName
- The other propertyOrders by the specified property name (defaults to ascending)
propertyName
- The property name to order byOrders by the specified property name (defaults to ascending)
o
- The order objectOrders by the specified property name and direction
propertyName
- The property name to order bydirection
- Either "asc" for ascending or "desc" for descendingDefines projections
callable
- The closure defining the projectionsA projection that obtains the value of a property of an entity
name
- The name of the propertyCreates an rlike Criterion based on the specified property name and value.
propertyName
- The property namepropertyValue
- The property valueCount the number of records returned
Computes the sum of a property
name
- The name of the property