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

java.lang.Object
  extended by 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...

See Also:
Serialized Form

Constructor Summary
QueryStructure(AbstractQuery<T> owner, CriteriaBuilderImpl criteriaBuilder)
           
 
Method Summary
 void addCorrelationRoot(FromImplementor fromImplementor)
           
 Set<Join<?,?>> collectCorrelatedJoins()
           
<X> Root<X>
from(Class<X> entityClass)
           
<X> Root<X>
from(EntityType<X> entityType)
           
 List<Expression<?>> getGroupings()
           
 Predicate getHaving()
           
 Set<ParameterExpression<?>> getParameters()
           
 Predicate getRestriction()
           
 Set<Root<?>> getRoots()
           
 Selection<? extends T> getSelection()
           
 List<Subquery<?>> getSubqueries()
           
 List<Subquery<?>> internalGetSubqueries()
           
 boolean isDistinct()
           
 void render(StringBuilder jpaqlQuery, CriteriaQueryCompiler.RenderingContext renderingContext)
           
 void setDistinct(boolean distinct)
           
 void setGroupings(Expression<?>... groupings)
           
 void setGroupings(List<Expression<?>> groupings)
           
 void setHaving(Predicate having)
           
 void setRestriction(Predicate restriction)
           
 void setSelection(Selection<? extends T> selection)
           
<U> 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(AbstractQuery<T> owner,
                      CriteriaBuilderImpl criteriaBuilder)
Method Detail

getParameters

public Set<ParameterExpression<?>> getParameters()

isDistinct

public boolean isDistinct()

setDistinct

public void setDistinct(boolean distinct)

getSelection

public Selection<? extends T> getSelection()

setSelection

public void setSelection(Selection<? extends T> selection)

getRoots

public Set<Root<?>> getRoots()

from

public <X> Root<X> from(Class<X> entityClass)

from

public <X> Root<X> from(EntityType<X> entityType)

addCorrelationRoot

public void addCorrelationRoot(FromImplementor fromImplementor)

collectCorrelatedJoins

public Set<Join<?,?>> collectCorrelatedJoins()

getRestriction

public Predicate getRestriction()

setRestriction

public void setRestriction(Predicate restriction)

getGroupings

public List<Expression<?>> getGroupings()

setGroupings

public void setGroupings(List<Expression<?>> groupings)

setGroupings

public void setGroupings(Expression<?>... groupings)

getHaving

public Predicate getHaving()

setHaving

public void setHaving(Predicate having)

getSubqueries

public List<Subquery<?>> getSubqueries()

internalGetSubqueries

public List<Subquery<?>> internalGetSubqueries()

subquery

public <U> Subquery<U> subquery(Class<U> subqueryType)

render

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


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