Top Description Fields Constructors Methods
org.hibernate.criterion

public abstract Class SubqueryExpression

extends Object
implements Criterion
Class Inheritance
All Implemented Interfaces
org.hibernate.criterion.Criterion, java.io.Serializable
Known Direct Subclasses
org.hibernate.criterion.ExistsSubqueryExpression, org.hibernate.criterion.PropertiesSubqueryExpression, org.hibernate.criterion.PropertySubqueryExpression, org.hibernate.criterion.SimpleSubqueryExpression
Imports
org.hibernate.Criteria, .HibernateException, org.hibernate.engine.spi.QueryParameters, .SessionFactoryImplementor, .SharedSessionContractImplementor, .TypedValue, org.hibernate.internal.CriteriaImpl, org.hibernate.loader.criteria.CriteriaJoinWalker, .CriteriaQueryTranslator, org.hibernate.persister.entity.OuterJoinLoadable, org.hibernate.type.Type

A criterion that involves a subquery
Authors
Gavin King, Steve Ebersole

Field Summary

Modifier and TypeField and Description
private CriteriaImpl
private CriteriaQueryTranslator
private String
private QueryParameters
private String
private Type[]

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
private void
createAndSetInnerQuery(CriteriaQuery
The criteria query
criteriaQuery
,
SessionFactoryImplementor
The session factory.
factory
)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
Creates the inner query used to extract some useful information about types, since it is needed in both methods.
private SharedSessionContractImplementor
public TypedValue[]
getTypedValues(Criteria
The local criteria
criteria
,
CriteriaQuery
The overall criteria query
criteriaQuery
)

Implements org.hibernate.criterion.Criterion.getTypedValues.

Return typed values for all parameters in the rendered SQL fragment
protected Type[]
protected abstract String
toLeftSqlString(Criteria criteria, CriteriaQuery outerQuery)

public String
toSqlString(Criteria
The local criteria
criteria
,
CriteriaQuery
The overall criteria query
criteriaQuery
)

Implements org.hibernate.criterion.Criterion.toSqlString.

Render the SQL fragment
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

criteriaImplback to summary
private CriteriaImpl criteriaImpl
innerQueryback to summary
private CriteriaQueryTranslator innerQuery
opback to summary
private String op
paramsback to summary
private QueryParameters params
quantifierback to summary
private String quantifier
typesback to summary
private Type[] types

Constructor Detail

SubqueryExpressionback to summary
protected SubqueryExpression(String op, String quantifier, DetachedCriteria dc)

Method Detail

createAndSetInnerQueryback to summary
private void createAndSetInnerQuery(CriteriaQuery criteriaQuery, SessionFactoryImplementor factory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Creates the inner query used to extract some useful information about types, since it is needed in both methods.

Parameters
criteriaQuery:CriteriaQuery

The criteria query

factory:SessionFactoryImplementor

The session factory.

deriveRootSessionback to summary
private SharedSessionContractImplementor deriveRootSession(Criteria criteria)
getTypedValuesback to summary
public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException

Implements org.hibernate.criterion.Criterion.getTypedValues.

Doc from org.hibernate.criterion.Criterion.getTypedValues.

Return typed values for all parameters in the rendered SQL fragment

Parameters
criteria:Criteria

The local criteria

criteriaQuery:CriteriaQuery

The overall criteria query

Returns:TypedValue[]

The types values (for binding)

Annotations
@Override
Exceptions
HibernateException:
Problem determining types.
getTypesback to summary
protected Type[] getTypes()
toLeftSqlStringback to summary
protected abstract String toLeftSqlString(Criteria criteria, CriteriaQuery outerQuery)
toSqlStringback to summary
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException

Implements org.hibernate.criterion.Criterion.toSqlString.

Doc from org.hibernate.criterion.Criterion.toSqlString.

Render the SQL fragment

Parameters
criteria:Criteria

The local criteria

criteriaQuery:CriteriaQuery

The overall criteria query

Returns:String

The generated SQL fragment

Annotations
@Override
Exceptions
HibernateException:
Problem during rendering.