public abstract class AbstractCriteriaBuilder extends groovy.lang.GroovyObjectSupport implements Criteria, ProjectionList
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 |
|
private java.util.List<Query.Junction> |
logicalExpressionStack |
|
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) |
|
public 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 |
|
public Criteria |
and(groovy.lang.Closure callable) |
|
public ProjectionList |
avg(java.lang.String name) Computes the average value of a property |
|
public Criteria |
between(java.lang.String propertyName, java.lang.Object start, java.lang.Object finish) Restricts the results by the given property value range (inclusive) |
|
public void |
build(groovy.lang.Closure criteria) |
|
private QueryableCriteria |
buildQueryableCriteria(groovy.lang.Closure queryClosure) |
|
public Criteria |
cache(boolean cache) |
|
public ProjectionList |
count() |
|
public ProjectionList |
countDistinct(java.lang.String property) Projection that signifies to count distinct results |
|
public ProjectionList |
distinct() Projection that signifies to return only distinct results |
|
public ProjectionList |
distinct(java.lang.String property) Projection that signifies to return only distinct results |
|
protected void |
ensureQueryIsInitialized() |
|
public Criteria |
eq(java.lang.String propertyName, java.lang.Object propertyValue) Creates an "equals" Criterion based on the specified property name and value. |
|
public 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 |
|
public 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 |
|
public Criteria |
eqProperty(java.lang.String propertyName, java.lang.String otherPropertyName) Constraints a property to be equal to a specified other property |
|
public Criteria |
exists(QueryableCriteria<?> subquery) |
|
public 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 |
|
public 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 |
|
public 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 |
|
public Criteria |
geProperty(java.lang.String propertyName, java.lang.String otherPropertyName) Constraints a property to be greater than or equal to a specified other property |
|
public Criteria |
geSome(java.lang.String propertyName, QueryableCriteria propertyValue) |
|
public Criteria |
geSome(java.lang.String propertyName, groovy.lang.Closure<?> propertyValue) |
|
public Query |
getQuery() |
|
public java.lang.Class |
getTargetClass() |
|
public ProjectionList |
groupProperty(java.lang.String property) Defines a group by projection for datastores that support it |
|
public 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 |
|
public 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 |
|
public 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 |
|
public Criteria |
gtProperty(java.lang.String propertyName, java.lang.String otherPropertyName) Constraints a property to be greater than a specified other property |
|
public Criteria |
gtSome(java.lang.String propertyName, QueryableCriteria propertyValue) |
|
public Criteria |
gtSome(java.lang.String propertyName, groovy.lang.Closure<?> propertyValue) |
|
public 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 |
|
private void |
handleJunction(Junction junction, groovy.lang.Closure callable) |
|
public ProjectionList |
id() |
|
public Criteria |
idEq(java.lang.Object propertyValue) Creates an "equals" Criterion based on the specified property name and value. |
|
public Criteria |
idEquals(java.lang.Object value) |
|
public Criteria |
ilike(java.lang.String propertyName, java.lang.Object propertyValue) Creates an ilike Criterion based on the specified property name and value. |
|
public Criteria |
in(java.lang.String propertyName, QueryableCriteria<?> subquery) |
|
public Criteria |
in(java.lang.String propertyName, groovy.lang.Closure<?> subquery) |
|
public Criteria |
in(java.lang.String propertyName, java.util.Collection values) Creates an "in" Criterion based on the specified property name and list of values. |
|
public Criteria |
in(java.lang.String propertyName, java.lang.Object[] values) Creates an "in" Criterion based on the specified property name and list of values. |
|
public Criteria |
inList(java.lang.String propertyName, QueryableCriteria<?> subquery) |
|
public Criteria |
inList(java.lang.String propertyName, groovy.lang.Closure<?> subquery) |
|
public Criteria |
inList(java.lang.String propertyName, java.util.Collection values) Creates an "in" Criterion based on the specified property name and list of values. |
|
public 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() |
|
public java.lang.Object |
invokeMethod(java.lang.String name, java.lang.Object obj) |
|
private boolean |
isCriteriaConstructionMethod(java.lang.String name, java.lang.Object[] args) |
|
public Criteria |
isEmpty(java.lang.String propertyName) |
|
public Criteria |
isNotEmpty(java.lang.String propertyName) |
|
public Criteria |
isNotNull(java.lang.String propertyName) |
|
public Criteria |
isNull(java.lang.String propertyName) |
|
public Criteria |
join(java.lang.String property) |
|
public 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 |
|
public 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 |
|
public 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 |
|
public Criteria |
leProperty(java.lang.String propertyName, java.lang.String otherPropertyName) Constraints a property to be less than or equal to a specified other property |
|
public Criteria |
leSome(java.lang.String propertyName, QueryableCriteria propertyValue) |
|
public Criteria |
leSome(java.lang.String propertyName, groovy.lang.Closure<?> propertyValue) |
|
public Criteria |
like(java.lang.String propertyName, java.lang.Object propertyValue) Creates an like Criterion based on the specified property name and value. |
|
public 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 |
|
public 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 |
|
public 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 |
|
public Criteria |
ltProperty(java.lang.String propertyName, java.lang.String otherPropertyName) Constraints a property to be less than a specified other property |
|
public Criteria |
ltSome(java.lang.String propertyName, QueryableCriteria propertyValue) |
|
public Criteria |
ltSome(java.lang.String propertyName, groovy.lang.Closure<?> propertyValue) |
|
public 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 |
|
public ProjectionList |
max(java.lang.String name) Computes the max value of a property |
|
public ProjectionList |
min(java.lang.String name) Computes the min value of a property |
|
public Criteria |
ne(java.lang.String propertyName, java.lang.Object propertyValue) Creates a "not equals" Criterion based on the specified property name and value. |
|
public Criteria |
neProperty(java.lang.String propertyName, java.lang.String otherPropertyName) Constraints a property to be not equal to a specified other property |
|
public Criteria |
not(groovy.lang.Closure callable) |
|
public Criteria |
notExists(QueryableCriteria<?> subquery) |
|
public Criteria |
notIn(java.lang.String propertyName, QueryableCriteria<?> subquery) |
|
public Criteria |
notIn(java.lang.String propertyName, groovy.lang.Closure<?> subquery) |
|
public Criteria |
or(groovy.lang.Closure callable) |
|
public Criteria |
order(java.lang.String propertyName) Orders by the specified property name (defaults to ascending) |
|
public Criteria |
order(Order o) Orders by the specified property name (defaults to ascending) |
|
public Criteria |
order(java.lang.String propertyName, java.lang.String direction) Orders by the specified property name and direction |
|
public ProjectionList |
projections(groovy.lang.Closure callable) Defines projections |
|
public ProjectionList |
property(java.lang.String name) A projection that obtains the value of a property of an entity |
|
public Criteria |
readOnly(boolean readOnly) |
|
public Criteria |
rlike(java.lang.String propertyName, java.lang.Object propertyValue) Creates an rlike Criterion based on the specified property name and value. |
|
public ProjectionList |
rowCount() Count the number of records returned |
|
public Criteria |
select(java.lang.String property) |
|
public void |
setUniqueResult(boolean uniqueResult) |
|
public Criteria |
sizeEq(java.lang.String propertyName, int size) |
|
public Criteria |
sizeGe(java.lang.String propertyName, int size) |
|
public Criteria |
sizeGt(java.lang.String propertyName, int size) |
|
public Criteria |
sizeLe(java.lang.String propertyName, int size) |
|
public Criteria |
sizeLt(java.lang.String propertyName, int size) |
|
public Criteria |
sizeNe(java.lang.String propertyName, int size) |
|
public 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#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(long, int), 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(), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object) |
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 rangeProjection 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