Groovy Documentation

org.codehaus.groovy.grails.orm.hibernate.query
[Java] Class HibernateQuery

java.lang.Object
  org.grails.datastore.mapping.query.Query
      org.codehaus.groovy.grails.orm.hibernate.query.HibernateQuery

@SuppressWarnings("rawtypes")
public class HibernateQuery
extends org.grails.datastore.mapping.query.Query

Bridges the Query API with the Hibernate Criteria API

Authors:
Graeme Rocher
Since:
1.0


Field Summary
static java.lang.String SIZE_CONSTRAINT_PREFIX

 
Constructor Summary
HibernateQuery(org.hibernate.Criteria criteria, HibernateSession session, org.grails.datastore.mapping.model.PersistentEntity entity)

HibernateQuery(org.hibernate.Criteria subCriteria, HibernateSession session, org.grails.datastore.mapping.model.PersistentEntity associatedEntity, java.lang.String newAlias)

 
Method Summary
void add(org.hibernate.criterion.Criterion criterion)

org.grails.datastore.mapping.query.Query allEq(java.util.Map values)

org.grails.datastore.mapping.query.Query and(org.hibernate.criterion.Criterion a, org.hibernate.criterion.Criterion b)

org.grails.datastore.mapping.query.Query between(java.lang.String property, java.lang.Object start, java.lang.Object end)

org.grails.datastore.mapping.query.AssociationQuery createQuery(java.lang.String associationName)

org.hibernate.criterion.Junction disjunction()

org.grails.datastore.mapping.query.Query eq(java.lang.String property, java.lang.Object value)

protected java.util.List executeQuery(org.grails.datastore.mapping.model.PersistentEntity entity, org.hibernate.criterion.Junction criteria)

org.grails.datastore.mapping.query.Query firstResult(int offset)

protected void flushBeforeQuery()

org.grails.datastore.mapping.query.Query ge(java.lang.String property, java.lang.Object value)

org.grails.datastore.mapping.model.PersistentEntity getEntity()

org.grails.datastore.mapping.query.Query gt(java.lang.String property, java.lang.Object value)

org.grails.datastore.mapping.query.Query gte(java.lang.String property, java.lang.Object value)

org.grails.datastore.mapping.query.Query idEq(java.lang.Object value)

org.grails.datastore.mapping.query.Query ilike(java.lang.String property, java.lang.String expr)

org.grails.datastore.mapping.query.Query in(java.lang.String property, java.util.List values)

org.grails.datastore.mapping.query.Query isEmpty(java.lang.String property)

org.grails.datastore.mapping.query.Query isNotEmpty(java.lang.String property)

org.grails.datastore.mapping.query.Query isNotNull(java.lang.String property)

org.grails.datastore.mapping.query.Query isNull(java.lang.String property)

org.grails.datastore.mapping.query.Query le(java.lang.String property, java.lang.Object value)

org.grails.datastore.mapping.query.Query like(java.lang.String property, java.lang.String expr)

java.util.List list()

org.grails.datastore.mapping.query.Query lt(java.lang.String property, java.lang.Object value)

org.grails.datastore.mapping.query.Query lte(java.lang.String property, java.lang.Object value)

org.grails.datastore.mapping.query.Query max(int max)

org.grails.datastore.mapping.query.Query maxResults(int max)

org.hibernate.criterion.Junction negation()

org.grails.datastore.mapping.query.Query offset(int offset)

org.grails.datastore.mapping.query.Query or(org.hibernate.criterion.Criterion a, org.hibernate.criterion.Criterion b)

org.grails.datastore.mapping.query.Query order(org.hibernate.criterion.Order order)

org.hibernate.criterion.ProjectionList projections()

org.grails.datastore.mapping.query.Query rlike(java.lang.String property, java.lang.String expr)

java.lang.Object singleResult()

 
Methods inherited from class org.grails.datastore.mapping.query.Query
org.grails.datastore.mapping.query.Query#order(org.grails.datastore.mapping.query.Query$Order), org.grails.datastore.mapping.query.Query#add(org.grails.datastore.mapping.query.Query$Criterion), org.grails.datastore.mapping.query.Query#cache(boolean), org.grails.datastore.mapping.query.Query#offset(int), org.grails.datastore.mapping.query.Query#max(int), org.grails.datastore.mapping.query.Query#eq(java.lang.String, java.lang.Object), org.grails.datastore.mapping.query.Query#isNotEmpty(java.lang.String), org.grails.datastore.mapping.query.Query#and(org.grails.datastore.mapping.query.Query$Criterion, org.grails.datastore.mapping.query.Query$Criterion), org.grails.datastore.mapping.query.Query#or(org.grails.datastore.mapping.query.Query$Criterion, org.grails.datastore.mapping.query.Query$Criterion), org.grails.datastore.mapping.query.Query#select(java.lang.String), org.grails.datastore.mapping.query.Query#ge(java.lang.String, java.lang.Object), org.grails.datastore.mapping.query.Query#isEmpty(java.lang.String), org.grails.datastore.mapping.query.Query#lt(java.lang.String, java.lang.Object), org.grails.datastore.mapping.query.Query#in(java.lang.String, java.util.List), org.grails.datastore.mapping.query.Query#join(java.lang.String), org.grails.datastore.mapping.query.Query#list(), org.grails.datastore.mapping.query.Query#le(java.lang.String, java.lang.Object), org.grails.datastore.mapping.query.Query#gt(java.lang.String, java.lang.Object), org.grails.datastore.mapping.query.Query#getEntity(), org.grails.datastore.mapping.query.Query#isNull(java.lang.String), org.grails.datastore.mapping.query.Query#getSession(), org.grails.datastore.mapping.query.Query#getOrderBy(), org.grails.datastore.mapping.query.Query#disjunction(), org.grails.datastore.mapping.query.Query#conjunction(), org.grails.datastore.mapping.query.Query#negation(), org.grails.datastore.mapping.query.Query#maxResults(int), org.grails.datastore.mapping.query.Query#firstResult(int), org.grails.datastore.mapping.query.Query#allEq(java.util.Map), org.grails.datastore.mapping.query.Query#createQuery(java.lang.String), org.grails.datastore.mapping.query.Query#singleResult(), org.grails.datastore.mapping.query.Query#setUniqueResult(boolean), org.grails.datastore.mapping.query.Query#like(java.lang.String, java.lang.String), org.grails.datastore.mapping.query.Query#gte(java.lang.String, java.lang.Object), org.grails.datastore.mapping.query.Query#lte(java.lang.String, java.lang.Object), org.grails.datastore.mapping.query.Query#projections(), org.grails.datastore.mapping.query.Query#idEq(java.lang.Object), org.grails.datastore.mapping.query.Query#getCriteria(), org.grails.datastore.mapping.query.Query#isNotNull(java.lang.String), org.grails.datastore.mapping.query.Query#between(java.lang.String, java.lang.Object, java.lang.Object), org.grails.datastore.mapping.query.Query#ilike(java.lang.String, java.lang.String), org.grails.datastore.mapping.query.Query#rlike(java.lang.String, java.lang.String), org.grails.datastore.mapping.query.Query#wait(), org.grails.datastore.mapping.query.Query#wait(long, int), org.grails.datastore.mapping.query.Query#wait(long), org.grails.datastore.mapping.query.Query#equals(java.lang.Object), org.grails.datastore.mapping.query.Query#toString(), org.grails.datastore.mapping.query.Query#hashCode(), org.grails.datastore.mapping.query.Query#getClass(), org.grails.datastore.mapping.query.Query#notify(), org.grails.datastore.mapping.query.Query#notifyAll()
 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long, int), 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()
 

Field Detail

SIZE_CONSTRAINT_PREFIX

public static final java.lang.String SIZE_CONSTRAINT_PREFIX


 
Constructor Detail

HibernateQuery

public HibernateQuery(org.hibernate.Criteria criteria, HibernateSession session, org.grails.datastore.mapping.model.PersistentEntity entity)


HibernateQuery

public HibernateQuery(org.hibernate.Criteria subCriteria, HibernateSession session, org.grails.datastore.mapping.model.PersistentEntity associatedEntity, java.lang.String newAlias)


 
Method Detail

add

@Override
public void add(org.hibernate.criterion.Criterion criterion)


allEq

public Query allEq(Map values) {
public org.grails.datastore.mapping.query.Query allEq(java.util.Map values)


and

public Query and(Criterion a, Criterion b) {
public org.grails.datastore.mapping.query.Query and(org.hibernate.criterion.Criterion a, org.hibernate.criterion.Criterion b)


between

public Query between(String property, Object start, Object end) {
public org.grails.datastore.mapping.query.Query between(java.lang.String property, java.lang.Object start, java.lang.Object end)


createQuery

public AssociationQuery createQuery(String associationName) {
public org.grails.datastore.mapping.query.AssociationQuery createQuery(java.lang.String associationName)


disjunction

public Junction disjunction() {
public org.hibernate.criterion.Junction disjunction()


eq

public Query eq(String property, Object value) {
public org.grails.datastore.mapping.query.Query eq(java.lang.String property, java.lang.Object value)


executeQuery

protected List executeQuery(PersistentEntity entity, Junction criteria) {
return list();
protected java.util.List executeQuery(org.grails.datastore.mapping.model.PersistentEntity entity, org.hibernate.criterion.Junction criteria)


firstResult

public Query firstResult(@SuppressWarnings("hiding") int offset) {
public org.grails.datastore.mapping.query.Query firstResult( int offset)


flushBeforeQuery

protected void flushBeforeQuery() {
protected void flushBeforeQuery()


ge

public Query ge(String property, Object value) {
public org.grails.datastore.mapping.query.Query ge(java.lang.String property, java.lang.Object value)


getEntity

public PersistentEntity getEntity() {
public org.grails.datastore.mapping.model.PersistentEntity getEntity()


gt

public Query gt(String property, Object value) {
public org.grails.datastore.mapping.query.Query gt(java.lang.String property, java.lang.Object value)


gte

public Query gte(String property, Object value) {
public org.grails.datastore.mapping.query.Query gte(java.lang.String property, java.lang.Object value)


idEq

public Query idEq(Object value) {
public org.grails.datastore.mapping.query.Query idEq(java.lang.Object value)


ilike

public Query ilike(String property, String expr) {
public org.grails.datastore.mapping.query.Query ilike(java.lang.String property, java.lang.String expr)


in

public Query in(String property, List values) {
public org.grails.datastore.mapping.query.Query in(java.lang.String property, java.util.List values)


isEmpty

@Override
public org.grails.datastore.mapping.query.Query isEmpty(java.lang.String property)


isNotEmpty

@Override
public org.grails.datastore.mapping.query.Query isNotEmpty(java.lang.String property)


isNotNull

@Override
public org.grails.datastore.mapping.query.Query isNotNull(java.lang.String property)


isNull

@Override
public org.grails.datastore.mapping.query.Query isNull(java.lang.String property)


le

public Query le(String property, Object value) {
public org.grails.datastore.mapping.query.Query le(java.lang.String property, java.lang.Object value)


like

public Query like(String property, String expr) {
public org.grails.datastore.mapping.query.Query like(java.lang.String property, java.lang.String expr)


list

public List list() {
public java.util.List list()


lt

public Query lt(String property, Object value) {
public org.grails.datastore.mapping.query.Query lt(java.lang.String property, java.lang.Object value)


lte

public Query lte(String property, Object value) {
public org.grails.datastore.mapping.query.Query lte(java.lang.String property, java.lang.Object value)


max

public Query max(@SuppressWarnings("hiding") int max) {
public org.grails.datastore.mapping.query.Query max(axResults(max); int max)


maxResults

public Query maxResults(@SuppressWarnings("hiding") int max) {
public org.grails.datastore.mapping.query.Query maxResults(ts(max); int max)


negation

public Junction negation() {
public org.hibernate.criterion.Junction negation()


offset

public Query offset(@SuppressWarnings("hiding") int offset) {
public org.grails.datastore.mapping.query.Query offset(tResult(offset); int offset)


or

public Query or(Criterion a, Criterion b) {
public org.grails.datastore.mapping.query.Query or(org.hibernate.criterion.Criterion a, org.hibernate.criterion.Criterion b)


order

public Query order(Order order) {
public org.grails.datastore.mapping.query.Query order(org.hibernate.criterion.Order order)


projections

public ProjectionList projections() {
public org.hibernate.criterion.ProjectionList projections()


rlike

public Query rlike(String property, String expr) {
public org.grails.datastore.mapping.query.Query rlike(java.lang.String property, java.lang.String expr)


singleResult

if (hibernateProjectionList != null) {
public java.lang.Object singleResult()


 

Groovy Documentation