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

java.lang.Object
  extended by org.hibernate.ejb.criteria.AbstractNode
      extended by org.hibernate.ejb.criteria.expression.AbstractTupleElement<X>
          extended by org.hibernate.ejb.criteria.expression.SelectionImpl<T>
              extended by org.hibernate.ejb.criteria.expression.ExpressionImpl<T>
                  extended by org.hibernate.ejb.criteria.CriteriaSubqueryImpl<T>
All Implemented Interfaces:
Serializable, AbstractQuery<T>, Expression<T>, Selection<T>, Subquery<T>, TupleElement<T>, ExpressionImplementor<T>, ParameterContainer, Renderable, SelectionImplementor<T>, TupleElementImplementor<T>

public class CriteriaSubqueryImpl<T>
extends ExpressionImpl<T>
implements Subquery<T>, Serializable

The Hibernate implementation of the JPA Subquery contract. Mostlty a set of delegation to its internal QueryStructure.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.hibernate.ejb.criteria.ParameterContainer
ParameterContainer.Helper
 
Constructor Summary
CriteriaSubqueryImpl(CriteriaBuilderImpl criteriaBuilder, Class<T> javaType, AbstractQuery<?> parent)
           
 
Method Summary
<X,Y> CollectionJoin<X,Y>
correlate(CollectionJoin<X,Y> source)
          
<X,Y> Join<X,Y>
correlate(Join<X,Y> source)
          
<X,Y> ListJoin<X,Y>
correlate(ListJoin<X,Y> source)
          
<X,K,V> MapJoin<X,K,V>
correlate(MapJoin<X,K,V> source)
          
<Y> Root<Y>
correlate(Root<Y> source)
          
<X,Y> SetJoin<X,Y>
correlate(SetJoin<X,Y> source)
          
 Subquery<T> distinct(boolean applyDistinction)
           
<X> Root<X>
from(Class<X> entityClass)
          
<X> Root<X>
from(EntityType<X> entityType)
          
 Set<Join<?,?>> getCorrelatedJoins()
          
 List<Expression<?>> getGroupList()
          
 Predicate getGroupRestriction()
          
 AbstractQuery<?> getParent()
          
 Predicate getRestriction()
          
 Class<T> getResultType()
          
 Set<Root<?>> getRoots()
          
 Expression<T> getSelection()
           
 Subquery<T> groupBy(Expression<?>... groupings)
          
 Subquery<T> groupBy(List<Expression<?>> groupings)
          
 Subquery<T> having(Expression<Boolean> expression)
          
 Subquery<T> having(Predicate... predicates)
          
 boolean isDistinct()
           
 void registerParameters(ParameterRegistry registry)
          Register any parameters contained within this query component with the given registry.
 String render(CriteriaQueryCompiler.RenderingContext renderingContext)
           
 String renderProjection(CriteriaQueryCompiler.RenderingContext renderingContext)
           
 Subquery<T> select(Expression<T> expression)
           
<U> Subquery<U>
subquery(Class<U> subqueryType)
          
 Subquery<T> where(Expression<Boolean> expression)
          
 Subquery<T> where(Predicate... predicates)
          
 
Methods inherited from class org.hibernate.ejb.criteria.expression.ExpressionImpl
as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, in, in, in, in, isNotNull, isNull
 
Methods inherited from class org.hibernate.ejb.criteria.expression.SelectionImpl
alias, getCompoundSelectionItems, getValueHandlers, isCompoundSelection
 
Methods inherited from class org.hibernate.ejb.criteria.expression.AbstractTupleElement
forceConversion, getAlias, getJavaType, getValueHandler, resetJavaType, setAlias
 
Methods inherited from class org.hibernate.ejb.criteria.AbstractNode
criteriaBuilder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.persistence.criteria.Expression
as, in, in, in, in, isNotNull, isNull
 
Methods inherited from interface javax.persistence.criteria.Selection
alias, getCompoundSelectionItems, isCompoundSelection
 
Methods inherited from interface javax.persistence.TupleElement
getAlias, getJavaType
 
Methods inherited from interface org.hibernate.ejb.criteria.SelectionImplementor
getValueHandlers
 
Methods inherited from interface org.hibernate.ejb.criteria.TupleElementImplementor
getValueHandler
 

Constructor Detail

CriteriaSubqueryImpl

public CriteriaSubqueryImpl(CriteriaBuilderImpl criteriaBuilder,
                            Class<T> javaType,
                            AbstractQuery<?> parent)
Method Detail

getParent

public AbstractQuery<?> getParent()

Specified by:
getParent in interface Subquery<T>

registerParameters

public void registerParameters(ParameterRegistry registry)
Register any parameters contained within this query component with the given registry.

Specified by:
registerParameters in interface ParameterContainer
Parameters:
registry - The parameter registry with which to register.

getResultType

public Class<T> getResultType()

Specified by:
getResultType in interface AbstractQuery<T>

getRoots

public Set<Root<?>> getRoots()

Specified by:
getRoots in interface AbstractQuery<T>

from

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

Specified by:
from in interface AbstractQuery<T>

from

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

Specified by:
from in interface AbstractQuery<T>

distinct

public Subquery<T> distinct(boolean applyDistinction)
Specified by:
distinct in interface AbstractQuery<T>
Specified by:
distinct in interface Subquery<T>

isDistinct

public boolean isDistinct()
Specified by:
isDistinct in interface AbstractQuery<T>

getSelection

public Expression<T> getSelection()
Specified by:
getSelection in interface AbstractQuery<T>
Specified by:
getSelection in interface Subquery<T>

select

public Subquery<T> select(Expression<T> expression)
Specified by:
select in interface Subquery<T>

getRestriction

public Predicate getRestriction()

Specified by:
getRestriction in interface AbstractQuery<T>

where

public Subquery<T> where(Expression<Boolean> expression)

Specified by:
where in interface AbstractQuery<T>
Specified by:
where in interface Subquery<T>

where

public Subquery<T> where(Predicate... predicates)

Specified by:
where in interface AbstractQuery<T>
Specified by:
where in interface Subquery<T>

getGroupList

public List<Expression<?>> getGroupList()

Specified by:
getGroupList in interface AbstractQuery<T>

groupBy

public Subquery<T> groupBy(Expression<?>... groupings)

Specified by:
groupBy in interface AbstractQuery<T>
Specified by:
groupBy in interface Subquery<T>

groupBy

public Subquery<T> groupBy(List<Expression<?>> groupings)

Specified by:
groupBy in interface AbstractQuery<T>
Specified by:
groupBy in interface Subquery<T>

getGroupRestriction

public Predicate getGroupRestriction()

Specified by:
getGroupRestriction in interface AbstractQuery<T>

having

public Subquery<T> having(Expression<Boolean> expression)

Specified by:
having in interface AbstractQuery<T>
Specified by:
having in interface Subquery<T>

having

public Subquery<T> having(Predicate... predicates)

Specified by:
having in interface AbstractQuery<T>
Specified by:
having in interface Subquery<T>

getCorrelatedJoins

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

Specified by:
getCorrelatedJoins in interface Subquery<T>

correlate

public <Y> Root<Y> correlate(Root<Y> source)

Specified by:
correlate in interface Subquery<T>

correlate

public <X,Y> Join<X,Y> correlate(Join<X,Y> source)

Specified by:
correlate in interface Subquery<T>

correlate

public <X,Y> CollectionJoin<X,Y> correlate(CollectionJoin<X,Y> source)

Specified by:
correlate in interface Subquery<T>

correlate

public <X,Y> SetJoin<X,Y> correlate(SetJoin<X,Y> source)

Specified by:
correlate in interface Subquery<T>

correlate

public <X,Y> ListJoin<X,Y> correlate(ListJoin<X,Y> source)

Specified by:
correlate in interface Subquery<T>

correlate

public <X,K,V> MapJoin<X,K,V> correlate(MapJoin<X,K,V> source)

Specified by:
correlate in interface Subquery<T>

subquery

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

Specified by:
subquery in interface AbstractQuery<T>

render

public String render(CriteriaQueryCompiler.RenderingContext renderingContext)
Specified by:
render in interface Renderable

renderProjection

public String renderProjection(CriteriaQueryCompiler.RenderingContext renderingContext)
Specified by:
renderProjection in interface Renderable


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