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, javax.persistence.criteria.AbstractQuery<T>, javax.persistence.criteria.Expression<T>, javax.persistence.criteria.Selection<T>, javax.persistence.criteria.Subquery<T>, TupleElement<T>, ExpressionImplementor<T>, ParameterContainer, Renderable, SelectionImplementor<T>, TupleElementImplementor<T>

public class CriteriaSubqueryImpl<T>
extends ExpressionImpl<T>
implements javax.persistence.criteria.Subquery<T>, Serializable

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

Author:
Steve Ebersole
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, javax.persistence.criteria.AbstractQuery<?> parent)
           
 
Method Summary
<X,Y> javax.persistence.criteria.CollectionJoin<X,Y>
correlate(javax.persistence.criteria.CollectionJoin<X,Y> source)
          
<X,Y> javax.persistence.criteria.Join<X,Y>
correlate(javax.persistence.criteria.Join<X,Y> source)
          
<X,Y> javax.persistence.criteria.ListJoin<X,Y>
correlate(javax.persistence.criteria.ListJoin<X,Y> source)
          
<X,K,V> javax.persistence.criteria.MapJoin<X,K,V>
correlate(javax.persistence.criteria.MapJoin<X,K,V> source)
          
<Y> javax.persistence.criteria.Root<Y>
correlate(javax.persistence.criteria.Root<Y> source)
          
<X,Y> javax.persistence.criteria.SetJoin<X,Y>
correlate(javax.persistence.criteria.SetJoin<X,Y> source)
          
 javax.persistence.criteria.Subquery<T> distinct(boolean applyDistinction)
           
<X> javax.persistence.criteria.Root<X>
from(Class<X> entityClass)
          
<X> javax.persistence.criteria.Root<X>
from(javax.persistence.metamodel.EntityType<X> entityType)
          
 Set<javax.persistence.criteria.Join<?,?>> getCorrelatedJoins()
          
 List<javax.persistence.criteria.Expression<?>> getGroupList()
          
 javax.persistence.criteria.Predicate getGroupRestriction()
          
 javax.persistence.criteria.AbstractQuery<?> getParent()
          
 javax.persistence.criteria.Predicate getRestriction()
          
 Class<T> getResultType()
          
 Set<javax.persistence.criteria.Root<?>> getRoots()
          
 javax.persistence.criteria.Expression<T> getSelection()
           
 javax.persistence.criteria.Subquery<T> groupBy(javax.persistence.criteria.Expression<?>... groupings)
          
 javax.persistence.criteria.Subquery<T> groupBy(List<javax.persistence.criteria.Expression<?>> groupings)
          
 javax.persistence.criteria.Subquery<T> having(javax.persistence.criteria.Expression<Boolean> expression)
          
 javax.persistence.criteria.Subquery<T> having(javax.persistence.criteria.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)
           
 javax.persistence.criteria.Subquery<T> select(javax.persistence.criteria.Expression<T> expression)
           
<U> javax.persistence.criteria.Subquery<U>
subquery(Class<U> subqueryType)
          
 javax.persistence.criteria.Subquery<T> where(javax.persistence.criteria.Expression<Boolean> expression)
          
 javax.persistence.criteria.Subquery<T> where(javax.persistence.criteria.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,
                            javax.persistence.criteria.AbstractQuery<?> parent)
Method Detail

getParent

public javax.persistence.criteria.AbstractQuery<?> getParent()

Specified by:
getParent in interface javax.persistence.criteria.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 javax.persistence.criteria.AbstractQuery<T>

getRoots

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

Specified by:
getRoots in interface javax.persistence.criteria.AbstractQuery<T>

from

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

Specified by:
from in interface javax.persistence.criteria.AbstractQuery<T>

from

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

Specified by:
from in interface javax.persistence.criteria.AbstractQuery<T>

distinct

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

isDistinct

public boolean isDistinct()
Specified by:
isDistinct in interface javax.persistence.criteria.AbstractQuery<T>

getSelection

public javax.persistence.criteria.Expression<T> getSelection()
Specified by:
getSelection in interface javax.persistence.criteria.AbstractQuery<T>
Specified by:
getSelection in interface javax.persistence.criteria.Subquery<T>

select

public javax.persistence.criteria.Subquery<T> select(javax.persistence.criteria.Expression<T> expression)
Specified by:
select in interface javax.persistence.criteria.Subquery<T>

getRestriction

public javax.persistence.criteria.Predicate getRestriction()

Specified by:
getRestriction in interface javax.persistence.criteria.AbstractQuery<T>

where

public javax.persistence.criteria.Subquery<T> where(javax.persistence.criteria.Expression<Boolean> expression)

Specified by:
where in interface javax.persistence.criteria.AbstractQuery<T>
Specified by:
where in interface javax.persistence.criteria.Subquery<T>

where

public javax.persistence.criteria.Subquery<T> where(javax.persistence.criteria.Predicate... predicates)

Specified by:
where in interface javax.persistence.criteria.AbstractQuery<T>
Specified by:
where in interface javax.persistence.criteria.Subquery<T>

getGroupList

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

Specified by:
getGroupList in interface javax.persistence.criteria.AbstractQuery<T>

groupBy

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

Specified by:
groupBy in interface javax.persistence.criteria.AbstractQuery<T>
Specified by:
groupBy in interface javax.persistence.criteria.Subquery<T>

groupBy

public javax.persistence.criteria.Subquery<T> groupBy(List<javax.persistence.criteria.Expression<?>> groupings)

Specified by:
groupBy in interface javax.persistence.criteria.AbstractQuery<T>
Specified by:
groupBy in interface javax.persistence.criteria.Subquery<T>

getGroupRestriction

public javax.persistence.criteria.Predicate getGroupRestriction()

Specified by:
getGroupRestriction in interface javax.persistence.criteria.AbstractQuery<T>

having

public javax.persistence.criteria.Subquery<T> having(javax.persistence.criteria.Expression<Boolean> expression)

Specified by:
having in interface javax.persistence.criteria.AbstractQuery<T>
Specified by:
having in interface javax.persistence.criteria.Subquery<T>

having

public javax.persistence.criteria.Subquery<T> having(javax.persistence.criteria.Predicate... predicates)

Specified by:
having in interface javax.persistence.criteria.AbstractQuery<T>
Specified by:
having in interface javax.persistence.criteria.Subquery<T>

getCorrelatedJoins

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

Specified by:
getCorrelatedJoins in interface javax.persistence.criteria.Subquery<T>

correlate

public <Y> javax.persistence.criteria.Root<Y> correlate(javax.persistence.criteria.Root<Y> source)

Specified by:
correlate in interface javax.persistence.criteria.Subquery<T>

correlate

public <X,Y> javax.persistence.criteria.Join<X,Y> correlate(javax.persistence.criteria.Join<X,Y> source)

Specified by:
correlate in interface javax.persistence.criteria.Subquery<T>

correlate

public <X,Y> javax.persistence.criteria.CollectionJoin<X,Y> correlate(javax.persistence.criteria.CollectionJoin<X,Y> source)

Specified by:
correlate in interface javax.persistence.criteria.Subquery<T>

correlate

public <X,Y> javax.persistence.criteria.SetJoin<X,Y> correlate(javax.persistence.criteria.SetJoin<X,Y> source)

Specified by:
correlate in interface javax.persistence.criteria.Subquery<T>

correlate

public <X,Y> javax.persistence.criteria.ListJoin<X,Y> correlate(javax.persistence.criteria.ListJoin<X,Y> source)

Specified by:
correlate in interface javax.persistence.criteria.Subquery<T>

correlate

public <X,K,V> javax.persistence.criteria.MapJoin<X,K,V> correlate(javax.persistence.criteria.MapJoin<X,K,V> source)

Specified by:
correlate in interface javax.persistence.criteria.Subquery<T>

subquery

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

Specified by:
subquery in interface javax.persistence.criteria.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-2010 Red Hat, Inc. All Rights Reserved.