Top Description Methods
org.hibernate.query.hql.spi

public Interface SqmQueryImplementor<R>

extends QueryImplementor<R>, SqmQuery, NameableQuery
Known Direct Implementers
org.hibernate.query.sqm.internal.QuerySqmImpl
Imports
java.time.Instant, java.util.Calendar, .Collection, .Date, .Map, org.hibernate.CacheMode, .FlushMode, .LockMode, .LockOptions, org.hibernate.graph.GraphSemantic, .RootGraph, org.hibernate.query.BindableType, .QueryParameter, .ResultListTransformer, .TupleTransformer, org.hibernate.query.named.NameableQuery, .NamedQueryMemento, org.hibernate.query.spi.ParameterMetadataImplementor, .QueryImplementor, .SqmQuery, org.hibernate.query.sqm.tree.SqmStatement, org.hibernate.transform.ResultTransformer, jakarta.persistence.FlushModeType, .LockModeType, .Parameter, .TemporalType

QueryImplementor specialization for SQM-based Query references
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public SqmQueryImplementor<R>
addQueryHint(String
The database specific query hint to add.
hint
)

Redeclares org.hibernate.query.Query.addQueryHint.

Add a database query hint to the SQL query.
public default SqmQueryImplementor<R>
applyFetchGraph(RootGraph<J> graph)

Overrides default org.hibernate.query.Query.applyFetchGraph.

Apply the given graph using fetch semantics.
public SqmQueryImplementor<R>
applyGraph(RootGraph<J>
The graph to apply.
graph
,
GraphSemantic
The semantic to use when applying the graph
semantic
)

Redeclares org.hibernate.query.Query.applyGraph.

Apply the given graph using the given semantic
public default SqmQueryImplementor<R>
applyLoadGraph(RootGraph<J> graph)

Overrides default org.hibernate.query.Query.applyLoadGraph.

Apply the given graph using load semantics.
public ParameterMetadataImplementor
public SqmStatement<R>
public SqmQueryImplementor<R>
setCacheable(boolean cacheable)

Redeclares org.hibernate.query.Query.setCacheable.

Enable/disable second level query (result) caching for this query.
public SqmQueryImplementor<R>
setCacheMode(CacheMode cacheMode)

Redeclares org.hibernate.query.Query.setCacheMode.

Set the current CacheMode in effect for this query.
public SqmQueryImplementor<R>
setCacheRegion(String cacheRegion)

Redeclares org.hibernate.query.Query.setCacheRegion.

Set the name of the cache region where query results should be cached (assuming isCacheable).
public SqmQueryImplementor<R>
setComment(String
The human-readable comment
comment
)

Redeclares org.hibernate.query.Query.setComment, org.hibernate.query.CommonQueryContract.setComment.

Set the comment for this query.
public SqmQueryImplementor<R>
setFetchSize(int
the fetch size hint
fetchSize
)

Redeclares org.hibernate.query.Query.setFetchSize.

Sets a JDBC fetch size hint for the query.
public SqmQueryImplementor<R>
setFirstResult(int
position of the first result, numbered from 0
startPosition
)

Redeclares org.hibernate.query.Query.setFirstResult.

Set the first row position to return from the query results.
public SqmQueryImplementor<R>
setFlushMode(FlushModeType
flush mode
flushMode
)

Redeclares org.hibernate.query.Query.setFlushMode, org.hibernate.query.CommonQueryContract.setFlushMode.

Set the flush mode type to be used for the query execution.
public SqmQueryImplementor<R>
public SqmQueryImplementor<R>
setHint(String
name of property or hint
hintName
,
Object
value for the property or hint
value
)

Redeclares org.hibernate.query.Query.setHint, org.hibernate.query.CommonQueryContract.setHint.

Set a query property or hint.
public SqmQueryImplementor<R>
setLockMode(String
A query alias
alias
,
LockMode
The lock mode to apply
lockMode
)

Redeclares org.hibernate.query.Query.setLockMode.

Set the LockMode to use for particular alias defined in the FROM clause of the query.
public SqmQueryImplementor<R>
setLockMode(LockModeType
lock mode
lockMode
)

Redeclares org.hibernate.query.Query.setLockMode.

Specify the root LockModeType for the query
public SqmQueryImplementor<R>
setLockOptions(LockOptions
The lock options to apply to the query.
lockOptions
)

Redeclares org.hibernate.query.Query.setLockOptions.

Apply the given lock options to this query.
public SqmQueryImplementor<R>
setMaxResults(int
maximum number of results to retrieve
maxResult
)

Redeclares org.hibernate.query.Query.setMaxResults.

Set the max number of rows requested for the query results.
public SqmQueryImplementor<R>
setParameter(String
parameter name
name
,
Object
parameter value
value
)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameter, org.hibernate.query.spi.SqmQuery.setParameter.

Bind the given argument to a named query parameter.
public <P> SqmQueryImplementor<R>
setParameter(String name, P value, Class<P> type)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameter, org.hibernate.query.spi.SqmQuery.setParameter.

Bind the given argument to a named query parameter using the given Class reference to attempt to determine the BindableType to use.
public <P> SqmQueryImplementor<R>
setParameter(String name, P value, BindableType<P> type)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameter, org.hibernate.query.spi.SqmQuery.setParameter.

Bind the given argument to a named query parameter using the given BindableType.
public SqmQueryImplementor<R>
setParameter(String name, Instant value, TemporalType temporalType)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameter, org.hibernate.query.spi.SqmQuery.setParameter.

Bind an Instant value to the named query parameter using just the portion indicated by the given TemporalType.
public SqmQueryImplementor<R>
public SqmQueryImplementor<R>
public SqmQueryImplementor<R>
setParameter(int
position
position
,
Object
parameter value
value
)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameter, org.hibernate.query.spi.SqmQuery.setParameter.

Bind the given argument to an ordinal query parameter.
public <P> SqmQueryImplementor<R>
setParameter(int position, P value, Class<P> type)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameter, org.hibernate.query.spi.SqmQuery.setParameter.

Bind the given argument to an ordinal query parameter using the given Class reference to attempt to determine the BindableType to use.
public <P> SqmQueryImplementor<R>
setParameter(int position, P value, BindableType<P> type)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameter, org.hibernate.query.spi.SqmQuery.setParameter.

Bind the given argument to an ordinal query parameter using the given BindableType.
public SqmQueryImplementor<R>
setParameter(int position, Instant value, TemporalType temporalType)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameter, org.hibernate.query.spi.SqmQuery.setParameter.

Bind an Instant value to the ordinal query parameter using just the portion indicated by the given TemporalType.
public SqmQueryImplementor<R>
public SqmQueryImplementor<R>
public <T> SqmQueryImplementor<R>
setParameter(QueryParameter<T>
the query parameter memento
parameter
,
T
the argument, which might be null
value
)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameter, org.hibernate.query.spi.SqmQuery.setParameter.

Bind an argument to the query parameter represented by the given QueryParameter.
public <P> SqmQueryImplementor<R>
setParameter(QueryParameter<P>
the query parameter memento
parameter
,
P
the argument, which might be null
value
,
Class<P>
a BindableType representing the type of the parameter
type
)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameter, org.hibernate.query.spi.SqmQuery.setParameter.

Bind an argument to the query parameter represented by the given QueryParameter using the given Class reference to attempt to determine the BindableType to use.
public <P> SqmQueryImplementor<R>
setParameter(QueryParameter<P>
the query parameter memento
parameter
,
P
the argument, which might be null
val
,
BindableType<P>
an BindableType representing the type of the parameter
type
)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameter, org.hibernate.query.spi.SqmQuery.setParameter.

Bind an argument to the query parameter represented by the given QueryParameter using the given BindableType.
public <T> SqmQueryImplementor<R>
public SqmQueryImplementor<R>
public SqmQueryImplementor<R>
public SqmQueryImplementor<R>
public <P> SqmQueryImplementor<R>
setParameterList(String name, Collection<? extends P> values, Class<P> javaType)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameterList, org.hibernate.query.spi.SqmQuery.setParameterList.

Bind multiple arguments to a named query parameter using the given Class reference to attempt to determine the BindableType to use.
public <P> SqmQueryImplementor<R>
setParameterList(String name, Collection<? extends P> values, BindableType<P> type)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameterList, org.hibernate.query.spi.SqmQuery.setParameterList.

Bind multiple arguments to a named query parameter using the given BindableType.
public SqmQueryImplementor<R>
public <P> SqmQueryImplementor<R>
setParameterList(String name, P[] values, Class<P> javaType)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameterList, org.hibernate.query.spi.SqmQuery.setParameterList.

Bind multiple arguments to a named query parameter using the given Class reference to attempt to determine the BindableType to use.
public <P> SqmQueryImplementor<R>
setParameterList(String name, P[] values, BindableType<P> type)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameterList, org.hibernate.query.spi.SqmQuery.setParameterList.

Bind multiple arguments to a named query parameter using the given BindableType.
public SqmQueryImplementor<R>
setParameterList(int position, Collection<E> values)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameterList, org.hibernate.query.spi.SqmQuery.setParameterList.

Bind multiple arguments to an ordinal query parameter.
public <P> SqmQueryImplementor<R>
setParameterList(int position, Collection<? extends P> values, Class<P> javaType)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameterList, org.hibernate.query.spi.SqmQuery.setParameterList.

Bind multiple arguments to an ordinal query parameter using the given Class reference to attempt to determine the BindableType to use.
public <P> SqmQueryImplementor<R>
setParameterList(int position, Collection<? extends P> values, BindableType<P> type)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameterList, org.hibernate.query.spi.SqmQuery.setParameterList.

Bind multiple arguments to an ordinal query parameter using the given BindableType.
public SqmQueryImplementor<R>
setParameterList(int position, Object[] values)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameterList, org.hibernate.query.spi.SqmQuery.setParameterList.

Bind multiple arguments to an ordinal query parameter.
public <P> SqmQueryImplementor<R>
setParameterList(int position, P[] values, Class<P> javaType)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameterList, org.hibernate.query.spi.SqmQuery.setParameterList.

Bind multiple arguments to an ordinal query parameter using the given Class reference to attempt to determine the BindableType to use.
public <P> SqmQueryImplementor<R>
setParameterList(int position, P[] values, BindableType<P> type)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameterList, org.hibernate.query.spi.SqmQuery.setParameterList.

Bind multiple arguments to an ordinal query parameter using the given BindableType.
public <P> SqmQueryImplementor<R>
setParameterList(QueryParameter<P>
the parameter memento
parameter
,
Collection<? extends P>
a collection of arguments
values
)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameterList, org.hibernate.query.spi.SqmQuery.setParameterList.

Bind multiple arguments to the query parameter represented by the given QueryParameter.
public <P> SqmQueryImplementor<R>
setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Class<P> javaType)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameterList, org.hibernate.query.spi.SqmQuery.setParameterList.

Bind multiple arguments to the query parameter represented by the given QueryParameter using the given Class reference to attempt to determine the BindableType to use.
public <P> SqmQueryImplementor<R>
setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, BindableType<P> type)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameterList, org.hibernate.query.spi.SqmQuery.setParameterList.

Bind multiple arguments to the query parameter represented by the given QueryParameter, inferring the BindableType.
public <P> SqmQueryImplementor<R>
setParameterList(QueryParameter<P>
the parameter memento
parameter
,
P[]
a collection of arguments
values
)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameterList, org.hibernate.query.spi.SqmQuery.setParameterList.

Bind multiple arguments to the query parameter represented by the given QueryParameter.
public <P> SqmQueryImplementor<R>
setParameterList(QueryParameter<P> parameter, P[] values, Class<P> javaType)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameterList, org.hibernate.query.spi.SqmQuery.setParameterList.

Bind multiple arguments to the query parameter represented by the given QueryParameter using the given Class reference to attempt to determine the BindableType to use.
public <P> SqmQueryImplementor<R>
setParameterList(QueryParameter<P> parameter, P[] values, BindableType<P> type)

Redeclares org.hibernate.query.spi.QueryImplementor.setParameterList, org.hibernate.query.spi.SqmQuery.setParameterList.

Bind multiple arguments to the query parameter represented by the given QueryParameter, inferring the BindableType.
public SqmQueryImplementor<R>
setProperties(Object
any JavaBean or POJO
bean
)

Redeclares org.hibernate.query.spi.QueryImplementor.setProperties, org.hibernate.query.spi.SqmQuery.setProperties.

Bind the property values of the given bean to named parameters of the query, matching property names with parameter names and mapping property types to Hibernate types using heuristics.
public SqmQueryImplementor<R>
setProperties(Map<K, V>
a Map of names to arguments
bean
)

Redeclares org.hibernate.query.spi.QueryImplementor.setProperties, org.hibernate.query.spi.SqmQuery.setProperties.

Bind the values of the given Map for each named parameters of the query, matching key names with parameter names and mapping value types to Hibernate types using heuristics.
public SqmQueryImplementor<R>
setReadOnly(boolean
true indicates that entities and proxies loaded by the query are to be put in read-only mode; false indicates that entities and proxies loaded by the query will be put in modifiable mode
readOnly
)

Redeclares org.hibernate.query.Query.setReadOnly.

Set the read-only/modifiable mode for entities and proxies loaded by this Query.
public SqmQueryImplementor<R>
public default <T> SqmQueryImplementor<T>
public SqmQueryImplementor<R>
setTimeout(int
the timeout in seconds
timeout
)

Redeclares org.hibernate.query.Query.setTimeout, org.hibernate.query.CommonQueryContract.setTimeout.

Set the query timeout in seconds.
public <T> SqmQueryImplementor<T>
public NamedQueryMemento
toMemento(String name)

Redeclares org.hibernate.query.named.NameableQuery.toMemento.

Convert the query into the memento
Inherited from org.hibernate.query.spi.QueryImplementor:
getParameterBindingsgetSessionscrollscrollsetOptionalEntityNamesetOptionalIdsetOptionalObject
Inherited from org.hibernate.query.spi.SqmQuery:
getQueryOptionsgetQueryString