@groovy.transform.CompileStatic abstract class AbstractDetachedCriteria<T> extends java.lang.Object implements org.hibernate.Criteria, java.lang.Cloneable
Abstract super class for DetachedCriteria implementations
Modifiers | Name | Description |
---|---|---|
class |
AbstractDetachedCriteria.DetachedProjections |
Modifiers | Name | Description |
---|---|---|
protected java.lang.String |
alias |
|
protected java.util.Map<java.lang.String, DetachedAssociationCriteria> |
associationCriteriaMap |
|
protected java.lang.String |
connectionName |
|
protected java.util.List<Query.Criterion> |
criteria |
|
protected java.lang.Integer |
defaultMax |
|
protected java.lang.Integer |
defaultOffset |
|
protected java.util.List<DynamicFinder> |
dynamicFinders |
|
protected java.util.Map<java.lang.String, javax.persistence.FetchType> |
fetchStrategies |
|
protected java.util.Map<java.lang.String, javax.persistence.criteria.JoinType> |
joinTypes |
|
protected java.util.List<Query.Junction> |
junctions |
|
protected groovy.lang.Closure |
lazyQuery |
|
protected java.util.List<Query.Order> |
orders |
|
protected PersistentEntity |
persistentEntity |
|
protected java.util.List<Query.Projection> |
projections |
|
protected java.lang.Class |
targetClass |
Type | Name and description |
---|---|
java.lang.String |
alias |
ProjectionList |
projectionList |
Constructor and description |
---|
AbstractDetachedCriteria(java.lang.Class<T> targetClass, java.lang.String alias) Constructs a DetachedCriteria instance target the given class and alias for the name |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
add(Criterion criterion) |
|
Criteria |
allEq(java.util.Map<java.lang.String, java.lang.Object> propertyValues)
|
|
Criteria |
and(groovy.lang.Closure callable) Handles a conjunction |
|
protected void |
applyLazyCriteria() |
|
AbstractDetachedCriteria<T> |
avg(java.lang.String property) Adds a avg projection |
|
Criteria |
between(java.lang.String propertyName, java.lang.Object start, java.lang.Object finish)
|
|
AbstractDetachedCriteria<T> |
build(groovy.lang.Closure callable) Enable the builder syntax for constructing Criteria |
|
AbstractDetachedCriteria<T> |
buildLazy(groovy.lang.Closure callable) Enable the builder syntax for constructing Criteria |
|
protected abstract QueryableCriteria |
buildQueryableCriteria(groovy.lang.Closure queryClosure) |
|
Criteria |
cache(boolean shouldCache) |
|
protected AbstractDetachedCriteria<T> |
clone() |
|
protected java.util.List |
convertArgumentList(java.util.Collection argList) |
|
Criteria |
createAlias(java.lang.String associationPath, java.lang.String alias) If the underlying datastore supports aliases, then an alias is created for the given association |
|
AbstractDetachedCriteria<T> |
distinct(java.lang.String property) Adds a distinct property projection |
|
Criteria |
eq(java.lang.String propertyName, java.lang.Object propertyValue)
|
|
Criteria |
eqAll(java.lang.String propertyName, groovy.lang.Closure<?> propertyValue) |
|
Criteria |
eqAll(java.lang.String propertyName, QueryableCriteria propertyValue) |
|
Criteria |
eqProperty(java.lang.String propertyName, java.lang.String otherPropertyName)
|
|
Criteria |
exists(QueryableCriteria<?> subquery)
|
|
Criteria |
ge(java.lang.String property, java.lang.Object value)
|
|
Criteria |
geAll(java.lang.String propertyName, groovy.lang.Closure<?> propertyValue) |
|
Criteria |
geAll(java.lang.String propertyName, QueryableCriteria propertyValue) |
|
Criteria |
geProperty(java.lang.String propertyName, java.lang.String otherPropertyName)
|
|
Criteria |
geSome(java.lang.String propertyName, QueryableCriteria propertyValue) |
|
Criteria |
geSome(java.lang.String propertyName, groovy.lang.Closure<?> propertyValue) |
|
java.lang.String |
getAlias()
|
|
java.util.List<Query.Criterion> |
getCriteria() |
|
java.util.Map<java.lang.String, javax.persistence.FetchType> |
getFetchStrategies()
|
|
java.util.Map<java.lang.String, javax.persistence.criteria.JoinType> |
getJoinTypes()
|
|
java.util.List<Query.Order> |
getOrders() |
|
T |
getPersistentClass() |
|
PersistentEntity |
getPersistentEntity() |
|
java.util.List<Query.Projection> |
getProjections() |
|
Criteria |
gt(java.lang.String property, java.lang.Object value)
|
|
Criteria |
gtAll(java.lang.String propertyName, groovy.lang.Closure<?> propertyValue) |
|
Criteria |
gtAll(java.lang.String propertyName, QueryableCriteria propertyValue) |
|
Criteria |
gtProperty(java.lang.String propertyName, java.lang.String otherPropertyName)
|
|
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)
|
|
protected void |
handleJunction(groovy.lang.Closure callable) |
|
AbstractDetachedCriteria<T> |
id() Adds an id projection |
|
Criteria |
idEq(java.lang.Object propertyValue)
|
|
Criteria |
idEquals(java.lang.Object value)
|
|
Criteria |
ilike(java.lang.String propertyName, java.lang.Object propertyValue)
|
|
Criteria |
in(java.lang.String propertyName, java.util.Collection values)
|
|
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.lang.Object[] 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)
|
|
Criteria |
inList(java.lang.String propertyName, java.lang.Object[] values)
|
|
protected java.lang.Object |
initialiseIfNecessary(java.lang.Class<T> targetClass) |
|
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) Specifies whether a join query should be used (if join queries are supported by the underlying datastore) |
|
Criteria |
join(java.lang.String property, javax.persistence.criteria.JoinType joinType) Specifies whether a join query should be used (if join queries are supported by the underlying datastore) |
|
Criteria |
le(java.lang.String property, java.lang.Object value)
|
|
Criteria |
leAll(java.lang.String propertyName, groovy.lang.Closure<?> propertyValue) |
|
Criteria |
leAll(java.lang.String propertyName, QueryableCriteria propertyValue) |
|
Criteria |
leProperty(java.lang.String propertyName, java.lang.String otherPropertyName)
|
|
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)
|
|
Criteria |
lt(java.lang.String property, java.lang.Object value)
|
|
Criteria |
ltAll(java.lang.String propertyName, groovy.lang.Closure<?> propertyValue) |
|
Criteria |
ltAll(java.lang.String propertyName, QueryableCriteria propertyValue) |
|
Criteria |
ltProperty(java.lang.String propertyName, java.lang.String otherPropertyName)
|
|
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)
|
|
AbstractDetachedCriteria<T> |
max(int max) Sets the default max to use and returns a new criteria instance. |
|
AbstractDetachedCriteria<T> |
max(java.lang.String property) Adds a min projection |
|
java.lang.Object |
methodMissing(java.lang.String methodName, java.lang.Object args) Method missing handler that deals with the invocation of dynamic finders |
|
AbstractDetachedCriteria<T> |
min(java.lang.String property) Adds a sum projection |
|
Criteria |
ne(java.lang.String propertyName, java.lang.Object propertyValue)
|
|
Criteria |
neProperty(java.lang.String propertyName, java.lang.String otherPropertyName)
|
|
protected abstract AbstractDetachedCriteria |
newInstance() |
|
Criteria |
not(groovy.lang.Closure callable) Handles a disjunction |
|
Criteria |
notExists(QueryableCriteria<?> subquery)
|
|
Criteria |
notIn(java.lang.String propertyName, QueryableCriteria<?> subquery) |
|
Criteria |
notIn(java.lang.String propertyName, groovy.lang.Closure<?> subquery) |
|
AbstractDetachedCriteria<T> |
offset(int offset) Sets the default offset to use and returns a new criteria instance. |
|
Criteria |
or(groovy.lang.Closure callable) Handles a disjunction |
|
Criteria |
order(java.lang.String propertyName)
|
|
Criteria |
order(Order o) |
|
Criteria |
order(java.lang.String propertyName, java.lang.String direction)
|
|
Criteria |
projections(groovy.lang.Closure callable) Evaluate projections within the context of the given closure |
|
AbstractDetachedCriteria<T> |
property(java.lang.String property) Adds a property projection |
|
java.lang.Object |
propertyMissing(java.lang.String name) |
|
Criteria |
readOnly(boolean readOnly) |
|
Criteria |
rlike(java.lang.String propertyName, java.lang.Object propertyValue)
|
|
Criteria |
select(java.lang.String property) Specifies whether a select (lazy) query should be used (if join queries are supported by the underlying datastore) |
|
Criteria |
setAlias(java.lang.String alias) Sets the root alias to be used for the query |
|
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)
|
|
AbstractDetachedCriteria<T> |
sort(java.lang.String property) Adds a sort order to this criteria instance |
|
AbstractDetachedCriteria<T> |
sort(java.lang.String property, java.lang.String direction) Adds a sort order to this criteria instance |
|
AbstractDetachedCriteria<T> |
sum(java.lang.String property) Adds a sum projection |
|
AbstractDetachedCriteria<T> |
where(groovy.lang.Closure additionalQuery) Where method derives a new query from this query. |
|
AbstractDetachedCriteria<T> |
whereLazy(groovy.lang.Closure additionalQuery) Where method derives a new query from this query. |
|
AbstractDetachedCriteria<T> |
withConnection(java.lang.String name) Create a return a new DetachedCriteria that uses the given connection |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), 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() |
Constructs a DetachedCriteria instance target the given class and alias for the name
targetClass
- The target classalias
- The root alias to be used in queries
Handles a conjunction
callable
- Callable closureAdds a avg projection
property
- The property to avg by
Enable the builder syntax for constructing Criteria
callable
- The callable closureEnable the builder syntax for constructing Criteria
callable
- The callable closureIf the underlying datastore supports aliases, then an alias is created for the given association
associationPath
- The name of the associationalias
- The aliasAdds a distinct property projection
property
- The property to obtain the distinct value for
Adds an id projection
property
- The property to project
Specifies whether a join query should be used (if join queries are supported by the underlying datastore)
property
- The propertySpecifies whether a join query should be used (if join queries are supported by the underlying datastore)
property
- The propertyjoinType
- The join type
Sets the default max to use and returns a new criteria instance. This method does not mutate the original criteria!
max
- The max to useAdds a min projection
property
- The property to max byMethod missing handler that deals with the invocation of dynamic finders
methodName
- The method nameargs
- The argumentsAdds a sum projection
property
- The property to min by
Handles a disjunction
callable
- Callable closure
Sets the default offset to use and returns a new criteria instance. This method does not mutate the original criteria!
offset
- The offset to useHandles a disjunction
callable
- Callable closureEvaluate projections within the context of the given closure
callable
- The callableAdds a property projection
property
- The property to projectSpecifies whether a select (lazy) query should be used (if join queries are supported by the underlying datastore)
property
- The propertySets the root alias to be used for the query
alias
- The aliasAdds a sort order to this criteria instance
property
- The property to sort byAdds a sort order to this criteria instance
property
- The property to sort bydirection
- The direction to sort byAdds a sum projection
property
- The property to sum byWhere method derives a new query from this query. This method will not mutate the original query, but instead return a new one.
additionalQuery
- The additional queryWhere method derives a new query from this query. This method will not mutate the original query, but instead return a new one.
additionalQuery
- The additional queryCreate a return a new DetachedCriteria that uses the given connection
name
- The connection namecallable
- The callable closureGroovy Documentation