## org.hibernate.ejb.criteria
Class QueryStructure<T>

    java.lang.Object
      org.hibernate.ejb.criteria.QueryStructure<T>

All Implemented Interfaces:
  Serializable

    public class QueryStructure<T>

extends Object
implements Serializable

Models basic query structure. Used as a delegate in implementing both `CriteriaQuery` and `Subquery`.

Note the `ORDER BY` specs are neglected here. That's because it is not valid for a subquery to define an `ORDER BY` clause. So we just handle them on the root query directly...

Author:
  Steve Ebersole
See Also:
  Serialized Form

Constructor Summary
`QueryStructure(javax.persistence.criteria.AbstractQuery<T> owner, CriteriaBuilderImpl criteriaBuilder)`

Method Summary
`void` `addCorrelationRoot(FromImplementor fromImplementor)`
`Set<javax.persistence.criteria.Join<?,?>>` `collectCorrelatedJoins()`

`

`<X> javax.persistence.criteria.Root<X>`

`

`from(Class<X> entityClass)`

`

`<X> javax.persistence.criteria.Root<X>`

`

`from(javax.persistence.metamodel.EntityType<X> entityType)`

`List<javax.persistence.criteria.Expression<?>>` `getGroupings()`
`javax.persistence.criteria.Predicate` `getHaving()`
`Set<javax.persistence.criteria.ParameterExpression<?>>` `getParameters()`
`javax.persistence.criteria.Predicate` `getRestriction()`
`Set<javax.persistence.criteria.Root<?>>` `getRoots()`
`javax.persistence.criteria.Selection<? extends T>` `getSelection()`
`List<javax.persistence.criteria.Subquery<?>>` `getSubqueries()`
`List<javax.persistence.criteria.Subquery<?>>` `internalGetSubqueries()`
`boolean` `isDistinct()`
`void` `render(StringBuilder jpaqlQuery, CriteriaQueryCompiler.RenderingContext renderingContext)`
`void` `setDistinct(boolean distinct)`
`void` `setGroupings(javax.persistence.criteria.Expression<?>... groupings)`
`void` `setGroupings(List<javax.persistence.criteria.Expression<?>> groupings)`
`void` `setHaving(javax.persistence.criteria.Predicate having)`
`void` `setRestriction(javax.persistence.criteria.Predicate restriction)`
`void` `setSelection(javax.persistence.criteria.Selection<? extends T> selection)`

`

`<U> javax.persistence.criteria.Subquery<U>`

`

`subquery(Class<U> subqueryType)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### QueryStructure

    public QueryStructure(javax.persistence.criteria.AbstractQuery<T> owner,
                          CriteriaBuilderImpl criteriaBuilder)

Method Detail

### getParameters

    public Set<javax.persistence.criteria.ParameterExpression<?>> getParameters()

### isDistinct

    public boolean isDistinct()

### setDistinct

    public void setDistinct(boolean distinct)

### getSelection

    public javax.persistence.criteria.Selection<? extends T> getSelection()

### setSelection

    public void setSelection(javax.persistence.criteria.Selection<? extends T> selection)

### getRoots

    public Set<javax.persistence.criteria.Root<?>> getRoots()

### from

    public <X> javax.persistence.criteria.Root<X> from(Class<X> entityClass)

### from

    public <X> javax.persistence.criteria.Root<X> from(javax.persistence.metamodel.EntityType<X> entityType)

### addCorrelationRoot

    public void addCorrelationRoot(FromImplementor fromImplementor)

### collectCorrelatedJoins

    public Set<javax.persistence.criteria.Join<?,?>> collectCorrelatedJoins()

### getRestriction

    public javax.persistence.criteria.Predicate getRestriction()

### setRestriction

    public void setRestriction(javax.persistence.criteria.Predicate restriction)

### getGroupings

    public List<javax.persistence.criteria.Expression<?>> getGroupings()

### setGroupings

    public void setGroupings(List<javax.persistence.criteria.Expression<?>> groupings)

### setGroupings

    public void setGroupings(javax.persistence.criteria.Expression<?>... groupings)

### getHaving

    public javax.persistence.criteria.Predicate getHaving()

### setHaving

    public void setHaving(javax.persistence.criteria.Predicate having)

### getSubqueries

    public List<javax.persistence.criteria.Subquery<?>> getSubqueries()

### internalGetSubqueries

    public List<javax.persistence.criteria.Subquery<?>> internalGetSubqueries()

### subquery

    public <U> javax.persistence.criteria.Subquery<U> subquery(Class<U> subqueryType)

### render

    public void render(StringBuilder jpaqlQuery,
                       CriteriaQueryCompiler.RenderingContext renderingContext)

Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.