public abstract class AbstractHibernateCriteriaBuilder extends groovy.lang.GroovyObjectSupport implements org.grails.datastore.mapping.query.apiBuildableCriteria, org.grails.datastore.mapping.query.apiProjectionList
Abstract super class for sharing code between Hibernate 3 and 4 implementations of HibernateCriteriaBuilder
| Modifiers | Name | Description |
|---|---|---|
protected class |
AbstractHibernateCriteriaBuilder.LogicalExpression |
instances of this class are pushed onto the logicalExpressionStack to represent all the unfinished "and", "or", and "not" expressions. |
| Modifiers | Name | Description |
|---|---|---|
protected static java.lang.String |
ALIAS |
|
static java.lang.String |
AND |
|
static java.lang.String |
BETWEEN |
|
protected static java.lang.String |
COUNT_CALL |
|
static java.lang.String |
EQUALS |
|
static java.lang.String |
EQUALS_PROPERTY |
|
protected static java.lang.String |
GET_CALL |
|
static java.lang.String |
GREATER_THAN |
|
static java.lang.String |
GREATER_THAN_OR_EQUAL |
|
static java.lang.String |
GREATER_THAN_OR_EQUAL_PROPERTY |
|
static java.lang.String |
GREATER_THAN_PROPERTY |
|
static java.lang.String |
ID_EQUALS |
|
static java.lang.String |
ILIKE |
|
static java.lang.String |
IN |
|
static java.lang.String |
IS_EMPTY |
|
static java.lang.String |
IS_NOT_EMPTY |
|
static java.lang.String |
IS_NOT_NULL |
|
static java.lang.String |
IS_NULL |
|
static java.lang.String |
LESS_THAN |
|
static java.lang.String |
LESS_THAN_OR_EQUAL |
|
static java.lang.String |
LESS_THAN_OR_EQUAL_PROPERTY |
|
static java.lang.String |
LESS_THAN_PROPERTY |
|
static java.lang.String |
LIKE |
|
protected static java.lang.String |
LIST_CALL |
|
protected static java.lang.String |
LIST_DISTINCT_CALL |
|
static java.lang.String |
NOT |
|
static java.lang.String |
NOT_EQUAL |
|
static java.lang.String |
NOT_EQUAL_PROPERTY |
|
static java.lang.String |
OR |
|
static java.lang.String |
ORDER_ASCENDING |
|
static java.lang.String |
ORDER_DESCENDING |
|
protected static java.lang.String |
PROJECTIONS |
|
static java.lang.String |
RLIKE |
|
protected static java.lang.String |
ROOT_CALL |
|
protected static java.lang.String |
ROOT_DO_CALL |
|
protected static java.lang.String |
SCROLL_CALL |
|
protected static java.lang.String |
SET_RESULT_TRANSFORMER_CALL |
|
static java.lang.String |
SIZE_EQUALS |
|
protected int |
aliasCount |
|
protected java.util.List<org.grails.datastore.mapping.query.api.Criteria> |
aliasInstanceStack |
|
protected java.util.Map<java.lang.String, java.lang.String> |
aliasMap |
|
protected java.util.List<java.lang.String> |
aliasStack |
|
protected java.util.List<java.lang.String> |
associationStack |
|
protected org.springframework.core.convert.ConversionService |
conversionService |
|
protected boolean |
count |
|
protected org.hibernate.Criteria |
criteria |
|
protected groovy.lang.MetaClass |
criteriaMetaClass |
|
protected AbstractHibernateDatastore |
datastore |
|
protected int |
defaultFlushMode |
|
protected org.hibernate.Session |
hibernateSession |
|
protected java.util.List<org.hibernate.criterion.LogicalExpression> |
logicalExpressionStack |
|
protected java.util.List<org.hibernate.criterion.Order> |
orderEntries |
|
protected boolean |
paginationEnabledList |
|
protected boolean |
participate |
|
protected org.grails.datastore.mapping.query.api.ProjectionList |
projectionList |
|
protected org.hibernate.transform.ResultTransformer |
resultTransformer |
|
protected boolean |
scroll |
|
protected org.hibernate.SessionFactory |
sessionFactory |
|
protected java.lang.Class<?> |
targetClass |
|
protected boolean |
uniqueResult |
| Constructor and description |
|---|
AbstractHibernateCriteriaBuilder(java.lang.Class targetClass, org.hibernate.SessionFactory sessionFactory) |
AbstractHibernateCriteriaBuilder(java.lang.Class targetClass, org.hibernate.SessionFactory sessionFactory, boolean uniqueResult) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected void |
addProjectionToList(Projection propertyProjection, java.lang.String alias)Adds a projection to the projectList for the given alias |
|
protected org.hibernate.criterion.Criterion |
addToCriteria(org.hibernate.criterion.Criterion c)adds and returns the given criterion to the currently active criteria set. |
|
public org.grails.datastore.mapping.query.api.Criteria |
allEq(java.util.Map<java.lang.String, java.lang.Object> propertyValues) |
|
public org.grails.datastore.mapping.query.api.Criteria |
and(groovy.lang.Closure callable) |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
avg(java.lang.String propertyName)Adds a projection that allows the criteria to return the property average value |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
avg(java.lang.String propertyName, java.lang.String alias)Adds a projection that allows the criteria to return the property average value |
|
public org.grails.datastore.mapping.query.api.Criteria |
between(java.lang.String propertyName, java.lang.Object lo, java.lang.Object hi)Creates a "between" Criterion based on the property name and specified lo and hi values |
|
public org.hibernate.Criteria |
buildCriteria(groovy.lang.Closure<?> criteriaClosure) |
|
public org.grails.datastore.mapping.query.api.BuildableCriteria |
cache(boolean shouldCache)Whether to use the query cache |
|
protected abstract void |
cacheCriteriaMapping() |
|
protected java.lang.String |
calculatePropertyName(java.lang.String propertyName)Calculates the property name including any alias paths |
|
protected java.lang.Object |
calculatePropertyValue(java.lang.Object propertyValue)Calculates the property value, converting GStrings if necessary |
|
protected void |
closeSession()Closes the session if it is copen |
|
protected java.util.List |
convertArgumentList(java.util.List argList) |
|
protected org.hibernate.criterion.Order |
convertOrder(org.grails.datastore.mapping.query.Query$Order o, java.lang.String property) |
|
protected abstract org.hibernate.criterion.DetachedCriteria |
convertToHibernateCriteria(org.grails.datastore.mapping.query.api.QueryableCriteria<?> queryableCriteria) |
|
public void |
count(java.lang.String propertyName)Adds a projection that allows the criteria to return the property count |
|
public void |
count(java.lang.String propertyName, java.lang.String alias)Adds a projection that allows the criteria to return the property count |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
count() |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
countDistinct(java.lang.String propertyName)Adds a projection that allows the criteria to return the distinct property count |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
countDistinct(java.lang.String propertyName, java.lang.String alias)Adds a projection that allows the criteria to return the distinct property count |
|
public org.hibernate.Criteria |
createAlias(java.lang.String associationPath, java.lang.String alias)Join an association, assigning an alias to the joined association. |
|
public abstract org.hibernate.Criteria |
createAlias(java.lang.String associationPath, java.lang.String alias, int joinType)Join an association using the specified join-type, assigning an alias to the joined association. |
|
protected abstract void |
createCriteriaInstance() |
|
protected abstract java.util.List |
createPagedResultList(java.util.Map args) |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
distinct(java.lang.String propertyName)A projection that selects a distince property name |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
distinct(java.lang.String propertyName, java.lang.String alias)A projection that selects a distince property name |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
distinct(java.util.Collection propertyNames)A distinct projection that takes a list |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
distinct(java.util.Collection propertyNames, java.lang.String alias)A distinct projection that takes a list |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
distinct() |
|
public org.grails.datastore.mapping.query.api.Criteria |
eq(java.lang.String propertyName, java.lang.Object propertyValue)Creates an "equals" Criterion based on the specified property name and value. |
|
public org.grails.datastore.mapping.query.api.Criteria |
eq(java.util.Map params, java.lang.String propertyName, java.lang.Object propertyValue)Groovy moves the map to the first parameter if using the idiomatic form, e.g. |
|
public org.grails.datastore.mapping.query.api.Criteria |
eq(java.lang.String propertyName, java.lang.Object propertyValue, java.util.Map params)Creates an "equals" Criterion based on the specified property name and value. |
|
public org.grails.datastore.mapping.query.api.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 org.grails.datastore.mapping.query.api.Criteria |
eqAll(java.lang.String propertyName, org.grails.datastore.mapping.query.api.QueryableCriteria propertyValue)Creates a subquery criterion that ensures the given property is equal to all the given returned values |
|
public org.grails.datastore.mapping.query.api.Criteria |
eqProperty(java.lang.String propertyName, java.lang.String otherPropertyName)Creates a Criterion that compares to class properties for equality |
|
protected org.grails.datastore.mapping.query.api.Criteria |
executeLogicalExpression(groovy.lang.Closure callable, java.lang.String logicalOperator) |
|
protected abstract java.lang.Object |
executeUniqueResultWithProxyUnwrap() |
|
public org.grails.datastore.mapping.query.api.Criteria |
exists(org.grails.datastore.mapping.query.api.QueryableCriteria<?> subquery) |
|
public void |
fetchMode(java.lang.String associationPath, org.hibernate.FetchMode fetchMode)Sets the fetch mode of an associated path |
|
public org.grails.datastore.mapping.query.api.Criteria |
ge(java.lang.String propertyName, java.lang.Object propertyValue)Creates a "greater than or equal to" Criterion based on the specified property name and value |
|
public org.grails.datastore.mapping.query.api.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 org.grails.datastore.mapping.query.api.Criteria |
geAll(java.lang.String propertyName, org.grails.datastore.mapping.query.api.QueryableCriteria propertyValue)Creates a subquery criterion that ensures the given property is greater than all the given returned values |
|
public org.grails.datastore.mapping.query.api.Criteria |
geProperty(java.lang.String propertyName, java.lang.String otherPropertyName)Creates a Criterion that tests if the first property is greater than or equal to the second property |
|
public org.grails.datastore.mapping.query.api.Criteria |
geSome(java.lang.String propertyName, org.grails.datastore.mapping.query.api.QueryableCriteria propertyValue) |
|
public org.grails.datastore.mapping.query.api.Criteria |
geSome(java.lang.String propertyName, groovy.lang.Closure<?> propertyValue) |
|
public java.lang.Object |
get(groovy.lang.Closure c) |
|
protected abstract java.lang.Class |
getClassForAssociationType(jakarta.persistence.metamodel.Attribute<?, ?> type) |
|
public int |
getDefaultFlushMode() |
|
public org.hibernate.Criteria |
getInstance()Returns the criteria instance |
|
public java.lang.Class<?> |
getTargetClass() |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
groupProperty(java.lang.String propertyName)Adds a projection that allows the criteria to return the distinct property count |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
groupProperty(java.lang.String propertyName, java.lang.String alias)Adds a projection that allows the criteria's result to be grouped by a property |
|
public org.grails.datastore.mapping.query.api.Criteria |
gt(java.lang.String propertyName, java.lang.Object propertyValue)Creates a "greater than" Criterion based on the specified property name and value |
|
public org.grails.datastore.mapping.query.api.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 org.grails.datastore.mapping.query.api.Criteria |
gtAll(java.lang.String propertyName, org.grails.datastore.mapping.query.api.QueryableCriteria propertyValue)Creates a subquery criterion that ensures the given property is greater than all the given returned values |
|
public org.grails.datastore.mapping.query.api.Criteria |
gtProperty(java.lang.String propertyName, java.lang.String otherPropertyName)Creates a Criterion that tests if the first property is greater than the second property |
|
public org.grails.datastore.mapping.query.api.Criteria |
gtSome(java.lang.String propertyName, org.grails.datastore.mapping.query.api.QueryableCriteria propertyValue) |
|
public org.grails.datastore.mapping.query.api.Criteria |
gtSome(java.lang.String propertyName, groovy.lang.Closure<?> propertyValue) |
|
public org.grails.datastore.mapping.query.api.Criteria |
gte(java.lang.String s, java.lang.Object o) |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
id() |
|
public org.grails.datastore.mapping.query.api.Criteria |
idEq(java.lang.Object o) |
|
public org.grails.datastore.mapping.query.api.Criteria |
idEquals(java.lang.Object o) |
|
public org.grails.datastore.mapping.query.api.Criteria |
ilike(java.lang.String propertyName, java.lang.Object propertyValue)Creates a Criterion with from the specified property name and "ilike" (a case sensitive version of "like") expression |
|
public org.grails.datastore.mapping.query.api.Criteria |
in(java.lang.String propertyName, org.grails.datastore.mapping.query.api.QueryableCriteria<?> subquery) |
|
public org.grails.datastore.mapping.query.api.Criteria |
in(java.lang.String propertyName, groovy.lang.Closure<?> subquery) |
|
public org.grails.datastore.mapping.query.api.Criteria |
in(java.lang.String propertyName, java.util.Collection values)Applys a "in" contrain on the specified property |
|
public org.grails.datastore.mapping.query.api.Criteria |
in(java.lang.String propertyName, java.lang.Object[] values)Applys a "in" contrain on the specified property |
|
public org.grails.datastore.mapping.query.api.Criteria |
inList(java.lang.String propertyName, org.grails.datastore.mapping.query.api.QueryableCriteria<?> subquery) |
|
public org.grails.datastore.mapping.query.api.Criteria |
inList(java.lang.String propertyName, groovy.lang.Closure<?> subquery) |
|
public org.grails.datastore.mapping.query.api.Criteria |
inList(java.lang.String propertyName, java.util.Collection values)Delegates to in as in is a Groovy keyword |
|
public org.grails.datastore.mapping.query.api.Criteria |
inList(java.lang.String propertyName, java.lang.Object[] values)Delegates to in as in is a Groovy keyword |
|
public java.lang.Object |
invokeMethod(java.lang.String name, java.lang.Object obj) |
|
public org.grails.datastore.mapping.query.api.Criteria |
isEmpty(java.lang.String property) |
|
public org.grails.datastore.mapping.query.api.Criteria |
isNotEmpty(java.lang.String property) |
|
public org.grails.datastore.mapping.query.api.Criteria |
isNotNull(java.lang.String property) |
|
public org.grails.datastore.mapping.query.api.Criteria |
isNull(java.lang.String property) |
|
public org.grails.datastore.mapping.query.api.BuildableCriteria |
join(java.lang.String associationPath)Use a join query |
|
public org.grails.datastore.mapping.query.api.BuildableCriteria |
join(java.lang.String property, jakarta.persistence.criteria.JoinType joinType) |
|
public org.grails.datastore.mapping.query.api.Criteria |
le(java.lang.String propertyName, java.lang.Object propertyValue)Creates a "less than or equal to" Criterion based on the specified property name and value |
|
public org.grails.datastore.mapping.query.api.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 org.grails.datastore.mapping.query.api.Criteria |
leAll(java.lang.String propertyName, org.grails.datastore.mapping.query.api.QueryableCriteria propertyValue)Creates a subquery criterion that ensures the given property is less than all the given returned values |
|
public org.grails.datastore.mapping.query.api.Criteria |
leProperty(java.lang.String propertyName, java.lang.String otherPropertyName)Creates a Criterion that tests if the first property is less than or equal to the second property |
|
public org.grails.datastore.mapping.query.api.Criteria |
leSome(java.lang.String propertyName, org.grails.datastore.mapping.query.api.QueryableCriteria propertyValue) |
|
public org.grails.datastore.mapping.query.api.Criteria |
leSome(java.lang.String propertyName, groovy.lang.Closure<?> propertyValue) |
|
public org.grails.datastore.mapping.query.api.Criteria |
like(java.lang.String propertyName, java.lang.Object propertyValue)Creates a Criterion with from the specified property name and "like" expression |
|
public java.lang.Object |
list(groovy.lang.Closure c) |
|
public java.lang.Object |
list(java.util.Map params, groovy.lang.Closure c) |
|
public java.lang.Object |
listDistinct(groovy.lang.Closure c) |
|
public void |
lock(boolean shouldLock)Whether a pessimistic lock should be obtained. |
|
public org.grails.datastore.mapping.query.api.Criteria |
lt(java.lang.String propertyName, java.lang.Object propertyValue)Creates a "less than" Criterion based on the specified property name and value |
|
public org.grails.datastore.mapping.query.api.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 org.grails.datastore.mapping.query.api.Criteria |
ltAll(java.lang.String propertyName, org.grails.datastore.mapping.query.api.QueryableCriteria propertyValue)Creates a subquery criterion that ensures the given property is less than all the given returned values |
|
public org.grails.datastore.mapping.query.api.Criteria |
ltProperty(java.lang.String propertyName, java.lang.String otherPropertyName)Creates a Criterion that tests if the first property is less than the second property |
|
public org.grails.datastore.mapping.query.api.Criteria |
ltSome(java.lang.String propertyName, org.grails.datastore.mapping.query.api.QueryableCriteria propertyValue) |
|
public org.grails.datastore.mapping.query.api.Criteria |
ltSome(java.lang.String propertyName, groovy.lang.Closure<?> propertyValue) |
|
public org.grails.datastore.mapping.query.api.Criteria |
lte(java.lang.String s, java.lang.Object o) |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
max(java.lang.String propertyName)Adds a projection that allows the criteria to retrieve a maximum property value |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
max(java.lang.String propertyName, java.lang.String alias)Adds a projection that allows the criteria to retrieve a maximum property value |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
min(java.lang.String propertyName)Adds a projection that allows the criteria to retrieve a minimum property value |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
min(java.lang.String propertyName, java.lang.String alias)Adds a projection that allows the criteria to retrieve a minimum property value |
|
public org.grails.datastore.mapping.query.api.Criteria |
ne(java.lang.String propertyName, java.lang.Object propertyValue)Creates a "not equal" Criterion based on the specified property name and value |
|
public org.grails.datastore.mapping.query.api.Criteria |
neProperty(java.lang.String propertyName, java.lang.String otherPropertyName)Creates a Criterion that compares to class properties for ! |
|
public org.grails.datastore.mapping.query.api.Criteria |
not(groovy.lang.Closure callable) |
|
public org.grails.datastore.mapping.query.api.Criteria |
notEqual(java.lang.String propertyName, java.lang.Object propertyValue) |
|
public org.grails.datastore.mapping.query.api.Criteria |
notExists(org.grails.datastore.mapping.query.api.QueryableCriteria<?> subquery) |
|
public org.grails.datastore.mapping.query.api.Criteria |
notIn(java.lang.String propertyName, org.grails.datastore.mapping.query.api.QueryableCriteria<?> subquery) |
|
public org.grails.datastore.mapping.query.api.Criteria |
notIn(java.lang.String propertyName, groovy.lang.Closure<?> subquery) |
|
public org.grails.datastore.mapping.query.api.Criteria |
or(groovy.lang.Closure callable) |
|
public org.grails.datastore.mapping.query.api.Criteria |
order(java.lang.String propertyName)Orders by the specified property name (defaults to ascending) |
|
public org.grails.datastore.mapping.query.api.Criteria |
order(org.hibernate.criterion.Order o)Orders by the specified property name (defaults to ascending) |
|
public org.grails.datastore.mapping.query.api.Criteria |
order(org.grails.datastore.mapping.query.Query$Order o) |
|
public org.grails.datastore.mapping.query.api.Criteria |
order(java.lang.String propertyName, java.lang.String direction)Orders by the specified property name and direction |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
property(java.lang.String propertyName)A projection that selects a property name |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
property(java.lang.String propertyName, java.lang.String alias)A projection that selects a property name |
|
public org.grails.datastore.mapping.query.api.BuildableCriteria |
readOnly(boolean readOnly)Whether to check for changes on the objects loaded |
|
public void |
resultTransformer(org.hibernate.transform.ResultTransformer transformer)Sets the resultTransformer. |
|
public abstract org.grails.datastore.mapping.query.api.Criteria |
rlike(java.lang.String propertyName, java.lang.Object propertyValue)Creates a Criterion with from the specified property name and "rlike" (a regular expression version of "like") expression |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
rowCount()Adds a projection that allows the criteria to return the row count |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
rowCount(java.lang.String alias)Adds a projection that allows the criteria to return the row count |
|
public java.lang.Object |
scroll(groovy.lang.Closure c) |
|
public org.grails.datastore.mapping.query.api.BuildableCriteria |
select(java.lang.String associationPath)Use a select query |
|
public void |
setConversionService(org.springframework.core.convert.ConversionService conversionService) |
|
public void |
setDatastore(AbstractHibernateDatastore datastore) |
|
public void |
setDefaultFlushMode(int defaultFlushMode) |
|
public void |
setUniqueResult(boolean uniqueResult)Set whether a unique result should be returned |
|
public org.grails.datastore.mapping.query.api.Criteria |
sizeEq(java.lang.String propertyName, int size)Creates a Criterion that contrains a collection property by size |
|
public org.grails.datastore.mapping.query.api.Criteria |
sizeGe(java.lang.String propertyName, int size)Creates a Criterion that contrains a collection property to be greater than or equal to the given size |
|
public org.grails.datastore.mapping.query.api.Criteria |
sizeGt(java.lang.String propertyName, int size)Creates a Criterion that contrains a collection property to be greater than the given size |
|
public org.grails.datastore.mapping.query.api.Criteria |
sizeLe(java.lang.String propertyName, int size)Creates a Criterion that contrains a collection property to be less than or equal to the given size |
|
public org.grails.datastore.mapping.query.api.Criteria |
sizeLt(java.lang.String propertyName, int size)Creates a Criterion that contrains a collection property to be less than to the given size |
|
public org.grails.datastore.mapping.query.api.Criteria |
sizeNe(java.lang.String propertyName, int size)Creates a Criterion that contrains a collection property to be not equal to the given size |
|
protected void |
sqlGroupProjection(java.lang.String sql, java.lang.String groupBy, java.util.List<java.lang.String> columnAliases, java.util.List<org.hibernate.type.Type> types)Adds a sql projection to the criteria |
|
protected void |
sqlProjection(java.lang.String sql, java.lang.String columnAlias, org.hibernate.type.Type type)Adds a sql projection to the criteria |
|
protected void |
sqlProjection(java.lang.String sql, java.util.List<java.lang.String> columnAliases, java.util.List<org.hibernate.type.Type> types)Adds a sql projection to the criteria |
|
public org.grails.datastore.mapping.query.api.Criteria |
sqlRestriction(java.lang.String sqlRestriction)Applies a sql restriction to the results to allow something like: |
|
public org.grails.datastore.mapping.query.api.Criteria |
sqlRestriction(java.lang.String sqlRestriction, java.util.List<?> values)Applies a sql restriction to the results to allow something like: |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
sum(java.lang.String propertyName)Adds a projection that allows the criteria to retrieve the sum of the results of a property |
|
public org.grails.datastore.mapping.query.api.ProjectionList |
sum(java.lang.String propertyName, java.lang.String alias)Adds a projection that allows the criteria to retrieve the sum of the results of a property |
|
protected void |
throwRuntimeException(java.lang.RuntimeException t)Throws a runtime exception where necessary to ensure the session gets closed |
|
protected boolean |
validateSimpleExpression() |
| Methods inherited from class | Name |
|---|---|
class groovy.lang.GroovyObjectSupport |
groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(long, int) |
Adds a projection to the projectList for the given alias
propertyProjection - The projectionalias - The aliasadds and returns the given criterion to the currently active criteria set. this might be either the root criteria or a currently open LogicalExpression.
Adds a projection that allows the criteria to return the property average value
propertyName - The name of the propertyAdds a projection that allows the criteria to return the property average value
propertyName - The name of the propertyalias - The alias to useCreates a "between" Criterion based on the property name and specified lo and hi values
propertyName - The property namelo - The low valuehi - The high valueWhether to use the query cache
shouldCache - True if the query should be cachedCalculates the property name including any alias paths
propertyName - The property nameCalculates the property value, converting GStrings if necessary
propertyValue - The property valueCloses the session if it is copen
Adds a projection that allows the criteria to return the property count
propertyName - The name of the propertyAdds a projection that allows the criteria to return the property count
propertyName - The name of the propertyalias - The alias to useAdds a projection that allows the criteria to return the distinct property count
propertyName - The name of the propertyAdds a projection that allows the criteria to return the distinct property count
propertyName - The name of the propertyalias - The alias to useJoin an association, assigning an alias to the joined association. Functionally equivalent to createAlias(String, String, int) using CriteriaSpecificationINNER_JOIN for the joinType.
associationPath - A dot-seperated property pathalias - The alias to assign to the joined association (for later reference).Join an association using the specified join-type, assigning an alias to the joined association. sub The joinType is expected to be one of CriteriaSpecification.INNER_JOIN (the default), CriteriaSpecificationFULL_JOIN, or CriteriaSpecificationLEFT_JOIN.
associationPath - A dot-seperated property pathalias - The alias to assign to the joined association (for later reference).joinType - The type of join to use.A projection that selects a distince property name
propertyName - The property nameA projection that selects a distince property name
propertyName - The property namealias - The alias to useA distinct projection that takes a list
propertyNames - The list of distince property namesA distinct projection that takes a list
propertyNames - The list of distince property namesalias - The alias to useCreates an "equals" Criterion based on the specified property name and value. Case-sensitive.
propertyName - The property namepropertyValue - The property value Groovy moves the map to the first parameter if using the idiomatic form, e.g.
eq 'firstName', 'Fred', ignoreCase: true.
params - optional map with customization parameters; currently only 'ignoreCase' is supported. Creates an "equals" Criterion based on the specified property name and value.
Supports case-insensitive search if the params map contains true
under the 'ignoreCase' key.
propertyName - The property namepropertyValue - The property valueparams - optional map with customization parameters; currently only 'ignoreCase' is supported.Creates 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 valueCreates a Criterion that compares to class properties for equality
propertyName - The first property nameotherPropertyName - The second property nameSets the fetch mode of an associated path
associationPath - The name of the associated pathfetchMode - The fetch mode to setCreates a "greater than or equal to" 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 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 valueCreates a Criterion that tests if the first property is greater than or equal to the second property
propertyName - The first property nameotherPropertyName - The second property nameReturns the criteria instance
Adds a projection that allows the criteria to return the distinct property count
propertyName - The name of the propertyAdds a projection that allows the criteria's result to be grouped by a property
propertyName - The name of the propertyalias - The alias to useCreates a "greater than" 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 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 valueCreates a Criterion that tests if the first property is greater than the second property
propertyName - The first property nameotherPropertyName - The second property nameCreates a Criterion with from the specified property name and "ilike" (a case sensitive version of "like") expression
propertyName - The property namepropertyValue - The ilike valueApplys a "in" contrain on the specified property
propertyName - The property namevalues - A collection of valuesApplys a "in" contrain on the specified property
propertyName - The property namevalues - A collection of valuesDelegates to in as in is a Groovy keyword
Delegates to in as in is a Groovy keyword
Use a join query
associationPath - The path of the associationCreates a "less than or equal to" 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 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 valueCreates a Criterion that tests if the first property is less than or equal to the second property
propertyName - The first property nameotherPropertyName - The second property nameCreates a Criterion with from the specified property name and "like" expression
propertyName - The property namepropertyValue - The like valueWhether a pessimistic lock should be obtained.
shouldLock - True if it shouldCreates a "less than" 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 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 valueCreates a Criterion that tests if the first property is less than the second property
propertyName - The first property nameotherPropertyName - The second property nameAdds a projection that allows the criteria to retrieve a maximum property value
propertyName - The name of the propertyAdds a projection that allows the criteria to retrieve a maximum property value
propertyName - The name of the propertyalias - The alias to useAdds a projection that allows the criteria to retrieve a minimum property value
propertyName - The name of the propertyAdds a projection that allows the criteria to retrieve a minimum property value
alias - The alias to useCreates a "not equal" Criterion based on the specified property name and value
propertyName - The property namepropertyValue - The property valueCreates a Criterion that compares to class properties for !equality
propertyName - The first property nameotherPropertyName - The second property nameOrders 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 property name to order byOrders by the specified property name and direction
propertyName - The property name to order bydirection - Either "asc" for ascending or "desc" for descendingA projection that selects a property name
propertyName - The name of the propertyA projection that selects a property name
propertyName - The name of the propertyalias - The alias to useWhether to check for changes on the objects loaded
readOnly - True to disable dirty checkingSets the resultTransformer.
transformer - The result transformer to use.Creates a Criterion with from the specified property name and "rlike" (a regular expression version of "like") expression
propertyName - The property namepropertyValue - The ilike valueAdds a projection that allows the criteria to return the row count
Adds a projection that allows the criteria to return the row count
alias - The alias to useUse a select query
associationPath - The path of the associationSet whether a unique result should be returned
uniqueResult - True if a unique result should be returnedCreates a Criterion that contrains a collection property by size
propertyName - The property namesize - The size to constrain byCreates a Criterion that contrains a collection property to be greater than or equal to the given size
propertyName - The property namesize - The size to constrain byCreates a Criterion that contrains a collection property to be greater than the given size
propertyName - The property namesize - The size to constrain byCreates a Criterion that contrains a collection property to be less than or equal to the given size
propertyName - The property namesize - The size to constrain byCreates a Criterion that contrains a collection property to be less than to the given size
propertyName - The property namesize - The size to constrain byCreates a Criterion that contrains a collection property to be not equal to the given size
propertyName - The property namesize - The size to constrain byAdds a sql projection to the criteria
sql - SQL projectinggroupBy - group by clausecolumnAliases - List of column aliases for the projected valuestypes - List of types for the projected valuesAdds a sql projection to the criteria
sql - SQL projecting a single valuecolumnAlias - column alias for the projected valuetype - the type of the projected valueAdds a sql projection to the criteria
sql - SQL projectingcolumnAliases - List of column aliases for the projected valuestypes - List of types for the projected valuesApplies a sql restriction to the results to allow something like:
sqlRestriction - the sql restrictionApplies a sql restriction to the results to allow something like:
sqlRestriction - the sql restrictionvalues - jdbc parametersAdds a projection that allows the criteria to retrieve the sum of the results of a property
propertyName - The name of the propertyAdds a projection that allows the criteria to retrieve the sum of the results of a property
propertyName - The name of the propertyalias - The alias to useThrows a runtime exception where necessary to ensure the session gets closed