Top Constructors Methods
org.hibernate.query.sqm.spi

public abstract Class DelegatingSqmSelectionQueryImplementor<R>

extends Object
implements SqmSelectionQueryImplementor<R>
Class Inheritance
All Implemented Interfaces
org.hibernate.query.sqm.spi.SqmSelectionQueryImplementor, org.hibernate.query.sqm.SqmSelectionQuery, org.hibernate.query.SelectionQuery, org.hibernate.query.CommonQueryContract, org.hibernate.query.spi.SqmQuery
Annotations
@Incubating
Imports
java.time.Instant, java.util.Calendar, .Collection, .Date, .List, .Map, .Optional, java.util.stream.Stream, org.hibernate.CacheMode, .FlushMode, .Incubating, .LockMode, .LockOptions, .Remove, .ScrollMode, .ScrollableResults, org.hibernate.graph.GraphSemantic, org.hibernate.query.BindableType, .Order, .Page, .ParameterMetadata, .QueryParameter, org.hibernate.query.spi.QueryOptions, org.hibernate.query.sqm.tree.SqmStatement, org.hibernate.sql.results.spi.ResultsConsumer, jakarta.persistence.CacheRetrieveMode, .CacheStoreMode, .EntityGraph, .FlushModeType, .LockModeType, .Parameter, .TemporalType

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public SqmSelectionQueryImplementor<R>
disableFetchProfile(String
the name of the fetch profile to be disabled
profileName
)

Implements org.hibernate.query.SelectionQuery.disableFetchProfile.

Disable the fetch profile with the given name in this session.
public SqmSelectionQueryImplementor<R>
enableFetchProfile(String
the name of the fetch profile to be enabled
profileName
)

Implements org.hibernate.query.SelectionQuery.enableFetchProfile.

Enable the fetch profile for this query.
public <T> T
public CacheMode
getCacheMode()

Implements org.hibernate.query.SelectionQuery.getCacheMode.

Obtain the CacheMode in effect for this query.
public String
getCacheRegion()

Implements org.hibernate.query.SelectionQuery.getCacheRegion.

Obtain the name of the second level query cache region in which query results will be stored (if they are cached, see the discussion on isCacheable() for more information).
public CacheRetrieveMode
public CacheStoreMode
public String
getComment()

Implements org.hibernate.query.CommonQueryContract.getComment.

Get the comment that has been set for this query, if any.
protected abstract SqmSelectionQueryImplementor<R>
public Integer
getFetchSize()

Implements org.hibernate.query.SelectionQuery.getFetchSize.

Obtain the JDBC fetch size hint in effect for this query.
public int
getFirstResult()

Implements org.hibernate.query.SelectionQuery.getFirstResult.

The first row position to return from the query results.
public FlushModeType
public FlushMode
public LockMode
public LockModeType
public LockOptions
getLockOptions()

Implements org.hibernate.query.SelectionQuery.getLockOptions.

The LockOptions currently in effect for the query
public int
getMaxResults()

Implements org.hibernate.query.SelectionQuery.getMaxResults.

The max number of rows requested for the query results
public ParameterMetadata
public QueryOptions
public String
public List<R>
getResultList()

Overrides default org.hibernate.query.SelectionQuery.getResultList.

Execute the query and return the query results as a List.
public Stream<R>
getResultStream()

Overrides default org.hibernate.query.SelectionQuery.getResultStream.

Execute the query and return the query results as a Stream.
public R
getSingleResult()

Implements org.hibernate.query.SelectionQuery.getSingleResult.

Execute the query and return the single result of the query, throwing an exception if the query returns no results.
public R
getSingleResultOrNull()

Implements org.hibernate.query.SelectionQuery.getSingleResultOrNull.

Execute the query and return the single result of the query, or null if the query returns no results.
public SqmStatement<T>
public Integer
getTimeout()

Implements org.hibernate.query.CommonQueryContract.getTimeout.

Obtain the query timeout in seconds.
public boolean
isCacheable()

Implements org.hibernate.query.SelectionQuery.isCacheable.

Should the results of the query be stored in the second level cache?
public boolean
isQueryPlanCacheable()

Implements org.hibernate.query.SelectionQuery.isQueryPlanCacheable.

Should the query plan of the query be stored in the query plan cache?
public boolean
isReadOnly()

Implements org.hibernate.query.SelectionQuery.isReadOnly.

Should entities and proxies loaded by this Query be put in read-only mode?
public List<R>
list()

Implements org.hibernate.query.SelectionQuery.list.

Execute the query and return the query results as a List.
public ScrollableResults<R>
scroll()

Implements org.hibernate.query.SelectionQuery.scroll.

Returns scrollable access to the query results.
public ScrollableResults<R>
scroll(ScrollMode scrollMode)

Implements org.hibernate.query.SelectionQuery.scroll.

Returns scrollable access to the query results.
public @Remove SqmSelectionQueryImplementor<R>
setAliasSpecificLockMode(String alias, LockMode lockMode)

Implements org.hibernate.query.SelectionQuery.setAliasSpecificLockMode.

Deprecated since 6.2.
Specify a LockMode to apply to a specific alias defined in the query
public SqmSelectionQueryImplementor<R>
setCacheable(boolean cacheable)

Implements org.hibernate.query.sqm.SqmSelectionQuery.setCacheable.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setCacheMode.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setCacheRegion.

Set the name of the cache region where query results should be cached (assuming isCacheable).
public SqmSelectionQueryImplementor<R>
public SqmSelectionQueryImplementor<R>
public SqmSelectionQueryImplementor<R>
public SqmSelectionQueryImplementor<R>
public SqmSelectionQueryImplementor<R>
setFetchSize(int
the fetch size hint
fetchSize
)

Implements org.hibernate.query.sqm.SqmSelectionQuery.setFetchSize.

Sets a JDBC fetch size hint for the query.
public SqmSelectionQueryImplementor<R>
setFirstResult(int startPosition)

Implements org.hibernate.query.SelectionQuery.setFirstResult.

Set the first row position to return from the query results.
public SqmSelectionQueryImplementor<R>
public SqmSelectionQueryImplementor<R>
setFollowOnLocking(boolean enable)

Implements org.hibernate.query.SelectionQuery.setFollowOnLocking.

Specifies whether follow-on locking should be applied
public SqmSelectionQueryImplementor<R>
setHibernateFlushMode(FlushMode flushMode)

Implements org.hibernate.query.sqm.SqmSelectionQuery.setHibernateFlushMode.

Set the current FlushMode in effect for this query.
public SqmSelectionQueryImplementor<R>
public SqmSelectionQueryImplementor<R>
public SqmSelectionQueryImplementor<R>
setLockMode(LockModeType lockMode)

Implements org.hibernate.query.SelectionQuery.setLockMode.

Specify the root LockModeType for the query
public SqmSelectionQueryImplementor<R>
setLockMode(String alias, LockMode lockMode)

Implements org.hibernate.query.SelectionQuery.setLockMode.

Specify a LockMode to apply to a specific alias defined in the query
public SqmSelectionQueryImplementor<R>
setMaxResults(int maxResult)

Implements org.hibernate.query.SelectionQuery.setMaxResults.

Set the max number of rows requested for the query results.
public SqmSelectionQueryImplementor<R>
setOrder(List<Order<? super R>>
one or more instances of Order
orders
)

Implements org.hibernate.query.SelectionQuery.setOrder.

If the result type of this query is an entity class, add one or more rules for ordering the query results.
public SqmSelectionQueryImplementor<R>
setOrder(Order<? super R>
an instance of Order
order
)

Implements org.hibernate.query.SelectionQuery.setOrder.

If the result type of this query is an entity class, add a rule for ordering the query results.
public SqmSelectionQueryImplementor<R>
setPage(Page page)

Implements org.hibernate.query.SelectionQuery.setPage.

Set the page of results to return.
public SqmSelectionQueryImplementor<R>
setParameter(String name, Object value)

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameter.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameter.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameter.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameter.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameter.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameter.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameter.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameter.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameter.

Bind an argument to the query parameter represented by the given QueryParameter.
public <P> SqmSelectionQueryImplementor<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
)

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameter.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameter.

Bind an argument to the query parameter represented by the given QueryParameter, using the given BindableType.
public <T> SqmSelectionQueryImplementor<R>
public SqmSelectionQueryImplementor<R>
public SqmSelectionQueryImplementor<R>
public SqmSelectionQueryImplementor<R>
setParameterList(String name, Collection<E> values)

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameterList.

Bind multiple arguments to a named query parameter.
public <P> SqmSelectionQueryImplementor<R>
setParameterList(String name, Collection<? extends P> values, Class<P> javaType)

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameterList.

Bind multiple arguments to a named query parameter using the given Class reference to attempt to infer the BindableType If unable to infer an appropriate BindableType, fall back to setParameterList(String, Collection).
public <P> SqmSelectionQueryImplementor<R>
setParameterList(String name, Collection<? extends P> values, BindableType<P> type)

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameterList.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameterList.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameterList.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameterList.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameterList.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameterList.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameterList.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameterList.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameterList.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameterList.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameterList.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameterList.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameterList.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameterList.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameterList.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setParameterList.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.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 SqmSelectionQueryImplementor<R>
setProperties(Map<K, V>
a Map of names to arguments
bean
)

Implements org.hibernate.query.sqm.SqmSelectionQuery.setProperties.

Bind the values of the given Map to named parameters of the query, matching key names with parameter names and mapping value types to Hibernate types using heuristics.
public SqmSelectionQueryImplementor<R>
setQueryPlanCacheable(boolean queryPlanCacheable)

Implements org.hibernate.query.SelectionQuery.setQueryPlanCacheable.

Enable/disable query plan caching for this query.
public SqmSelectionQueryImplementor<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
)

Implements org.hibernate.query.sqm.SqmSelectionQuery.setReadOnly.

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

Implements org.hibernate.query.sqm.SqmSelectionQuery.setTimeout.

Set the query timeout in seconds.
public Stream<R>
stream()

Overrides default org.hibernate.query.SelectionQuery.stream.

Execute the query and return the query results as a Stream.
public R
uniqueResult()

Implements org.hibernate.query.SelectionQuery.uniqueResult.

Execute the query and return the single result of the query, or null if the query returns no results.
public Optional<R>
uniqueResultOptional()

Implements org.hibernate.query.SelectionQuery.uniqueResultOptional.

Execute the query and return the single result of the query, as an Optional.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait