@java.lang.SuppressWarnings("rawtypes") public class CriteriaBuilder<T> extends AbstractCriteriaBuilder implements BuildableCriteria, ProjectionList
Criteria builder implementation that operates against DataStore abstraction.
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
ORDER_ASCENDING |
|
static java.lang.String |
ORDER_DESCENDING |
|
protected Session |
session |
Fields inherited from class | Fields |
---|---|
class AbstractCriteriaBuilder |
ORDER_ASCENDING, ORDER_DESCENDING, ROOT_CALL, ROOT_DO_CALL, SCROLL_CALL, orderEntries, paginationEnabledList, persistentEntity, projectionList, query, queryCreator, queryMetaClass, readOnly, targetClass, uniqueResult |
Constructor and description |
---|
CriteriaBuilder(java.lang.Class targetClass, QueryCreator queryCreator, MappingContext mappingContext) |
CriteriaBuilder(java.lang.Class targetClass, Session session) |
CriteriaBuilder(java.lang.Class targetClass, Session session, Query query) |
Type Params | Return Type | Name and description |
---|---|---|
|
public BuildableCriteria |
cache(boolean cache) |
|
public java.lang.Number |
count(groovy.lang.Closure callable) Defines and executes a count query in a single call. |
|
public java.lang.Object |
get(groovy.lang.Closure callable) Defines and executes a get query (a single result) in a single call. |
|
public BuildableCriteria |
join(java.lang.String property) |
|
public BuildableCriteria |
join(java.lang.String property, javax.persistence.criteria.JoinType joinType) |
|
public java.util.List |
list(groovy.lang.Closure callable) Defines and executes a list query in a single call. |
|
public java.util.List |
list(java.util.Map paginateParams, groovy.lang.Closure callable) |
|
public java.util.List |
listDistinct(groovy.lang.Closure callable) Defines and executes a list distinct query in a single call. |
|
public BuildableCriteria |
readOnly(boolean readOnly) |
|
public java.lang.Object |
scroll(groovy.lang.Closure c) |
|
public BuildableCriteria |
select(java.lang.String property) |
Methods inherited from class | Name |
---|---|
class AbstractCriteriaBuilder |
addToCriteria, allEq, and, avg, between, build, cache, count, countDistinct, distinct, distinct, ensureQueryIsInitialized, eq, eqAll, eqAll, eqProperty, exists, ge, geAll, geAll, geProperty, geSome, geSome, getQuery, getTargetClass, groupProperty, gt, gtAll, gtAll, gtProperty, gtSome, gtSome, gte, id, idEq, idEquals, ilike, in, in, in, in, inList, inList, inList, inList, invokeClosureNode, invokeList, invokeMethod, isEmpty, isNotEmpty, isNotNull, isNull, join, le, leAll, leAll, leProperty, leSome, leSome, like, lt, ltAll, ltAll, ltProperty, ltSome, ltSome, lte, max, min, ne, neProperty, not, notExists, notIn, notIn, or, order, order, order, projections, property, readOnly, rlike, rowCount, select, setUniqueResult, sizeEq, sizeGe, sizeGt, sizeLe, sizeLt, sizeNe, sum, validatePropertyName |
Defines and executes a count query in a single call. Example: Foo.createCriteria.count { }
callable
- The closure to executeDefines and executes a get query (a single result) in a single call. Example: Foo.createCriteria.get { }
callable
- The closure to executeDefines and executes a list query in a single call. Example: Foo.createCriteria.list { }
callable
- The closure to executeDefines and executes a list distinct query in a single call. Example: Foo.createCriteria.listDistinct { }
callable
- The closure to execute