Class DelegatingSqmSelectionQueryImplementor<R>
- All Implemented Interfaces:
CommonQueryContract,SelectionQuery<R>,SqmQuery<R>,SqmSelectionQueryImplementor<R>,SqmSelectionQuery<R>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondisableFetchProfile(String profileName) Disable the fetch profile with the given name in this session.enableFetchProfile(String profileName) Enable the fetch profile with the given name during execution of this query.<T> TexecuteQuery(ResultsConsumer<T, R> resultsConsumer) Obtain theCacheModein effect for this query.Obtain the name of the second level query cache region in which query results will be stored (if they are cached, see the discussion onSelectionQuery.isCacheable()for more information).Get the comment that has been set for this query, if any.protected abstract SqmSelectionQueryImplementor<R> Obtain the JDBC fetch size hint in effect for this query.intThe first query result row to return.Deprecated.Deprecated.Get the rootLockModefor the querygetKeyedResultList(KeyedPage<R> page) Execute the query and return the results for the given page, using key-based pagination.Get the rootLockModeTypefor the queryDeprecated.intThe maximum number of query result rows to return.Get theParameterMetadataobject representing the parameters of this query, and providing access to theQueryParameters.TheQueryFlushModein effect for this query.longDetermine the size of the query result list that would be returned by callingSelectionQuery.getResultList()with no offset or limit applied to the query.Execute the query and return the query results as aList.Execute the query and return the query results as aStream.Execute the query and return the single result of the query, throwing an exception if the query returns no results.Execute the query and return the single result of the query, ornullif the query returns no results.Obtain the query timeout in seconds.booleanShould the results of the query be stored in the second level cache?booleanShould the query plan of the query be stored in the query plan cache?booleanShould entities and proxies loaded by this Query be put in read-only mode? If the read-only/modifiable setting was not initialized, then the default read-only/modifiable setting for the persistence context i s returned instead.list()Execute the query and return the query results as aList.scroll()Returns scrollable access to the query results, using the default scroll mode of the SQL dialect.scroll(ScrollMode scrollMode) Returns scrollable access to the query results.setCacheable(boolean cacheable) Enable/disable second level query (result) caching for this query.setCacheMode(CacheMode cacheMode) Set the currentCacheModein effect for this query.setCacheRegion(String cacheRegion) Set the name of the cache region where query results should be cached (assumingSelectionQuery.isCacheable()).setCacheRetrieveMode(CacheRetrieveMode cacheRetrieveMode) setCacheStoreMode(CacheStoreMode cacheStoreMode) setComment(String comment) Set a comment for this query.setEntityGraph(EntityGraph<? super R> graph, GraphSemantic semantic) Apply anEntityGraphto the query.setFetchSize(int fetchSize) Sets a JDBC fetch size hint for the query.setFirstResult(int startPosition) Set the first query result row to return.setFlushMode(FlushModeType flushMode) Deprecated.setFollowOnLocking(boolean enable) Specifies whether follow-on locking should be appliedsetFollowOnStrategy(Locking.FollowOn followOnStrategy) Specifies whether follow-on locking should be appliedsetHibernateFlushMode(FlushMode flushMode) Deprecated.setHibernateLockMode(LockMode lockMode) Specify the rootLockModefor the querySet a hint.setLockMode(LockModeType lockMode) Specify the rootLockModeTypefor the querysetLockMode(String alias, LockMode lockMode) Specify aLockModeto apply to a specific alias defined in the querysetLockScope(PessimisticLockScope lockScope) Apply a scope to any pessimistic locking applied to the query.setLockScope(Locking.Scope lockScope) Apply a scope to any pessimistic locking applied to the query.setMaxResults(int maxResults) Set the maximum number of query result rows to return.Set the page of results to return.setParameter(int position, Object value) Bind the given argument to an ordinal query parameter.setParameter(int position, Instant value, TemporalType temporalType) Deprecated.setParameter(int position, Calendar value, TemporalType temporalType) Deprecated.setParameter(int position, Date value, TemporalType temporalType) Deprecated.setParameter(int position, P value, Type<P> type) Bind the given argument to an ordinal query parameter using the givenType.setParameter(int position, P value, Class<P> type) setParameter(Parameter<Calendar> param, Calendar value, TemporalType temporalType) Deprecated.setParameter(Parameter<Date> param, Date value, TemporalType temporalType) Deprecated.setParameter(Parameter<T> param, T value) setParameter(String name, Object value) Bind the given argument to a named query parameter.setParameter(String name, Instant value, TemporalType temporalType) Deprecated.setParameter(String name, Calendar value, TemporalType temporalType) Deprecated.setParameter(String name, Date value, TemporalType temporalType) Deprecated.setParameter(String name, P value, Type<P> type) Bind the given argument to a named query parameter using the givenType.setParameter(String name, P value, Class<P> type) setParameter(QueryParameter<P> parameter, P val, Type<P> type) Bind an argument to the query parameter represented by the givenQueryParameter, using the givenType.setParameter(QueryParameter<P> parameter, P value, Class<P> type) Bind an argument to the query parameter represented by the givenQueryParameter, using the givenClassreference to attempt to infer theTypeto use.setParameter(QueryParameter<T> parameter, T value) Bind an argument to the query parameter represented by the givenQueryParameter.setParameterList(int position, Object[] values) Bind multiple arguments to an ordinal query parameter.setParameterList(int position, Collection values) Bind multiple arguments to an ordinal query parameter.setParameterList(int position, Collection<? extends P> values, Type<P> type) Bind multiple arguments to an ordinal query parameter using the givenType.setParameterList(int position, Collection<? extends P> values, Class<P> javaType) setParameterList(int position, P[] values, Type<P> type) Bind multiple arguments to an ordinal query parameter using the givenType.setParameterList(int position, P[] values, Class<P> javaType) setParameterList(String name, Object[] values) Bind multiple arguments to a named query parameter.setParameterList(String name, Collection values) Bind multiple arguments to a named query parameter.setParameterList(String name, Collection<? extends P> values, Type<P> type) Bind multiple arguments to a named query parameter using the givenType.setParameterList(String name, Collection<? extends P> values, Class<P> javaType) Bind multiple arguments to a named query parameter using the givenClassreference to attempt to infer theTypeIf unable to infer an appropriateType, fall back toCommonQueryContract.setParameterList(String, Collection).setParameterList(String name, P[] values, Type<P> type) Bind multiple arguments to a named query parameter using the givenType.setParameterList(String name, P[] values, Class<P> javaType) Bind multiple arguments to a named query parameter using the given Class reference to attempt to determine theTypeto use.setParameterList(QueryParameter<P> parameter, Collection<? extends P> values) Bind multiple arguments to the query parameter represented by the givenQueryParameter.setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Type<P> type) Bind multiple arguments to the query parameter represented by the givenQueryParameter, using the givenType.setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Class<P> javaType) Bind multiple arguments to the query parameter represented by the givenQueryParameterusing the givenClassreference to attempt to infer theTypeto use.setParameterList(QueryParameter<P> parameter, P[] values) Bind multiple arguments to the query parameter represented by the givenQueryParameter.setParameterList(QueryParameter<P> parameter, P[] values, Type<P> type) Bind multiple arguments to the query parameter represented by the givenQueryParameter, using the given theType.setParameterList(QueryParameter<P> parameter, P[] values, Class<P> javaType) Bind multiple arguments to the query parameter represented by the givenQueryParameterusing the givenClassreference to attempt to infer theTypeto use.setProperties(Object bean) 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.setProperties(Map bean) Bind the values of the givenMapto named parameters of the query, matching key names with parameter names and mapping value types to Hibernate types using heuristics.setQueryFlushMode(QueryFlushMode queryFlushMode) Set theQueryFlushModeto use for this query.setQueryPlanCacheable(boolean queryPlanCacheable) Enable/disable query plan caching for this query.setReadOnly(boolean readOnly) Set the read-only/modifiable mode for entities and proxies loaded by thisQuery.setResultListTransformer(ResultListTransformer<R> transformer) Set aResultListTransformer.setTimeout(int timeout) Set the query timeout in seconds.setTimeout(Timeout timeout) Apply a timeout to the corresponding database query.<T> SqmSelectionQuery<T> setTupleTransformer(TupleTransformer<T> transformer) Set aTupleTransformer.stream()Execute the query and return the query results as aStream.Execute the query and return the single result of the query, ornullif the query returns no results.Execute the query and return the single result of the query, as anOptional.
-
Constructor Details
-
DelegatingSqmSelectionQueryImplementor
public DelegatingSqmSelectionQueryImplementor()
-
-
Method Details
-
getDelegate
-
getFlushMode
Deprecated.Description copied from interface:CommonQueryContractThe JPAFlushModeTypein effect for this query. By default, the query inherits theFlushModeof theSessionfrom which it originates.- Specified by:
getFlushModein interfaceCommonQueryContract- See Also:
-
setFlushMode
Deprecated.Description copied from interface:CommonQueryContractSet theFlushModeto use for this query.Setting this to
nullultimately indicates to use theFlushModeof the session. UseCommonQueryContract.setHibernateFlushMode(org.hibernate.FlushMode)passingFlushMode.MANUALinstead to indicate that no automatic flushing should occur.- Specified by:
setFlushModein interfaceCommonQueryContract- Specified by:
setFlushModein interfaceSelectionQuery<R>- See Also:
-
getHibernateFlushMode
Deprecated.Description copied from interface:CommonQueryContractTheFlushModein effect for this query. By default, the query inherits theFlushModeof theSessionfrom which it originates.- Specified by:
getHibernateFlushModein interfaceCommonQueryContract- See Also:
-
getQueryFlushMode
Description copied from interface:CommonQueryContractTheQueryFlushModein effect for this query.By default, this is
QueryFlushMode.DEFAULT, and theFlushModeof the owningSessiondetermines whether it is flushed.- Specified by:
getQueryFlushModein interfaceCommonQueryContract- See Also:
-
setQueryFlushMode
Description copied from interface:CommonQueryContractSet theQueryFlushModeto use for this query.- Specified by:
setQueryFlushModein interfaceCommonQueryContract- Specified by:
setQueryFlushModein interfaceSelectionQuery<R>- Specified by:
setQueryFlushModein interfaceSqmQuery<R>- Specified by:
setQueryFlushModein interfaceSqmSelectionQuery<R>- See Also:
-
getTimeout
Description copied from interface:CommonQueryContractObtain the query timeout in seconds.This value is eventually passed along to the JDBC statement via
Statement.setQueryTimeout(int).A value of zero indicates no timeout.
- Specified by:
getTimeoutin interfaceCommonQueryContract- See Also:
-
getComment
Description copied from interface:CommonQueryContractGet the comment that has been set for this query, if any.- Specified by:
getCommentin interfaceCommonQueryContract
-
setComment
Description copied from interface:CommonQueryContractSet a comment for this query.- Specified by:
setCommentin interfaceCommonQueryContract- Specified by:
setCommentin interfaceSelectionQuery<R>- See Also:
-
setHint
Description copied from interface:CommonQueryContractSet a hint. The hints understood by Hibernate are enumerated byAvailableHints.- Specified by:
setHintin interfaceCommonQueryContract- Specified by:
setHintin interfaceSelectionQuery<R>- See Also:
-
list
Description copied from interface:SelectionQueryExecute the query and return the query results as aList. If the query contains multiple items in the selection list, then by default each result in the list is packaged in an array of typeObject[].- Specified by:
listin interfaceSelectionQuery<R>- Returns:
- the result list
-
getResultList
Description copied from interface:SelectionQueryExecute the query and return the query results as aList. If the query contains multiple items in the selection list, then by default each result in the list is packaged in an array of typeObject[].- Specified by:
getResultListin interfaceSelectionQuery<R>- Returns:
- the results as a list
-
getResultCount
public long getResultCount()Description copied from interface:SelectionQueryDetermine the size of the query result list that would be returned by callingSelectionQuery.getResultList()with no offset or limit applied to the query.- Specified by:
getResultCountin interfaceSelectionQuery<R>- Returns:
- the size of the list that would be returned
-
getKeyedResultList
Description copied from interface:SelectionQueryExecute the query and return the results for the given page, using key-based pagination.- Specified by:
getKeyedResultListin interfaceSelectionQuery<R>- Parameters:
page- the key-based specification of the page as an instance ofKeyedPage- Returns:
- the query results and the key of the next page
as an instance of
KeyedResultList - See Also:
-
scroll
Description copied from interface:SelectionQueryReturns scrollable access to the query results, using the default scroll mode of the SQL dialect.- Specified by:
scrollin interfaceSelectionQuery<R>- See Also:
-
scroll
Description copied from interface:SelectionQueryReturns scrollable access to the query results. The capabilities of the returnedScrollableResultsdepend on the specifiedScrollMode.- Specified by:
scrollin interfaceSelectionQuery<R>
-
getResultStream
Description copied from interface:SelectionQueryExecute the query and return the query results as aStream. If the query contains multiple items in the selection list, then by default each result in the stream is packaged in an array of typeObject[].The client should call
BaseStream.close()after processing the stream so that resources are freed as soon as possible.- Specified by:
getResultStreamin interfaceSelectionQuery<R>- Returns:
- The results as a
Stream
-
stream
Description copied from interface:SelectionQueryExecute the query and return the query results as aStream. If the query contains multiple items in the selection list, then by default each result in the stream is packaged in an array of typeObject[].The client should call
BaseStream.close()after processing the stream so that resources are freed as soon as possible.- Specified by:
streamin interfaceSelectionQuery<R>- Returns:
- The results as a
Stream
-
uniqueResult
Description copied from interface:SelectionQueryExecute the query and return the single result of the query, ornullif the query returns no results.- Specified by:
uniqueResultin interfaceSelectionQuery<R>- Returns:
- the single result or
null
-
getSingleResult
Description copied from interface:SelectionQueryExecute the query and return the single result of the query, throwing an exception if the query returns no results.- Specified by:
getSingleResultin interfaceSelectionQuery<R>- Returns:
- the single result, only if there is exactly one
-
getSingleResultOrNull
Description copied from interface:SelectionQueryExecute the query and return the single result of the query, ornullif the query returns no results.- Specified by:
getSingleResultOrNullin interfaceSelectionQuery<R>- Returns:
- the single result or
nullif there is no result to return
-
uniqueResultOptional
Description copied from interface:SelectionQueryExecute the query and return the single result of the query, as anOptional.- Specified by:
uniqueResultOptionalin interfaceSelectionQuery<R>- Returns:
- the single result as an
Optional
-
setEntityGraph
public SqmSelectionQueryImplementor<R> setEntityGraph(EntityGraph<? super R> graph, GraphSemantic semantic) Description copied from interface:SelectionQueryApply anEntityGraphto the query.This is an alternative way to specify the associations which should be fetched as part of the initial query.
- Specified by:
setEntityGraphin interfaceSelectionQuery<R>
-
enableFetchProfile
Description copied from interface:SelectionQueryEnable the fetch profile with the given name during execution of this query. If the requested fetch profile is already enabled, the call has no effect.This is an alternative way to specify the associations which should be fetched as part of the initial query.
- Specified by:
enableFetchProfilein interfaceSelectionQuery<R>- Parameters:
profileName- the name of the fetch profile to be enabled- See Also:
-
disableFetchProfile
Description copied from interface:SelectionQueryDisable the fetch profile with the given name in this session. If the fetch profile is not currently enabled, the call has no effect.- Specified by:
disableFetchProfilein interfaceSelectionQuery<R>- Parameters:
profileName- the name of the fetch profile to be disabled- See Also:
-
getFetchSize
Description copied from interface:SelectionQueryObtain the JDBC fetch size hint in effect for this query. This value is eventually passed along to the JDBC query viaStatement.setFetchSize(int). As defined by JDBC, this value is a hint to the driver to indicate how many rows to fetch from the database when more rows are needed.- Specified by:
getFetchSizein interfaceSelectionQuery<R>- Returns:
- The timeout in seconds
- See Also:
-
isReadOnly
public boolean isReadOnly()Description copied from interface:SelectionQueryShould entities and proxies loaded by this Query be put in read-only mode? If the read-only/modifiable setting was not initialized, then the default read-only/modifiable setting for the persistence context i s returned instead.- Specified by:
isReadOnlyin interfaceSelectionQuery<R>- Returns:
trueif the entities and proxies loaded by the query will be put in read-only mode;falseotherwise (they will be modifiable)- See Also:
-
getMaxResults
public int getMaxResults()Description copied from interface:SelectionQueryThe maximum number of query result rows to return.- Specified by:
getMaxResultsin interfaceSelectionQuery<R>- Returns:
- the maximum length of the query result list
-
setMaxResults
Description copied from interface:SelectionQuerySet the maximum number of query result rows to return.- Specified by:
setMaxResultsin interfaceSelectionQuery<R>- Parameters:
maxResults- the maximum length of the query result list
-
getFirstResult
public int getFirstResult()Description copied from interface:SelectionQueryThe first query result row to return. The very first row of the query result list is considered the zeroth row.- Specified by:
getFirstResultin interfaceSelectionQuery<R>- Returns:
- the position of the first row to return, indexed from zero
-
setFirstResult
Description copied from interface:SelectionQuerySet the first query result row to return. The very first row of the query result list is considered the zeroth row.- Specified by:
setFirstResultin interfaceSelectionQuery<R>- Parameters:
startPosition- the position of the first row to return, indexed from zero
-
setPage
Description copied from interface:SelectionQuerySet the page of results to return.- Specified by:
setPagein interfaceSelectionQuery<R>- See Also:
-
getCacheMode
Description copied from interface:SelectionQueryObtain theCacheModein effect for this query. By default, the query inherits theCacheModeof the session from which it originates.The
CacheModehere affects the use of entity and collection caches as the query result set is processed. For caching of the actual query results, useSelectionQuery.isCacheable()andSelectionQuery.getCacheRegion().In order for this setting to have any affect, second-level caching must be enabled and the entities and collections must be eligible for storage in the second-level cache.
- Specified by:
getCacheModein interfaceSelectionQuery<R>- See Also:
-
getCacheStoreMode
- Specified by:
getCacheStoreModein interfaceSelectionQuery<R>- See Also:
-
getCacheRetrieveMode
- Specified by:
getCacheRetrieveModein interfaceSelectionQuery<R>- See Also:
-
setCacheStoreMode
- Specified by:
setCacheStoreModein interfaceSelectionQuery<R>- See Also:
-
setCacheRetrieveMode
- Specified by:
setCacheRetrieveModein interfaceSelectionQuery<R>- See Also:
-
isCacheable
public boolean isCacheable()Description copied from interface:SelectionQueryShould the results of the query be stored in the second level cache?This is different to second level caching of any returned entities and collections, which is controlled by
SelectionQuery.getCacheMode().The query being "eligible" for caching does not necessarily mean its results will be cached. Second-level query caching still has to be enabled on the
SessionFactoryfor this to happen. Usually that is controlled by the configuration setting "hibernate.cache.use_query_cache".- Specified by:
isCacheablein interfaceSelectionQuery<R>
-
isQueryPlanCacheable
public boolean isQueryPlanCacheable()Description copied from interface:SelectionQueryShould the query plan of the query be stored in the query plan cache?- Specified by:
isQueryPlanCacheablein interfaceSelectionQuery<R>
-
setQueryPlanCacheable
Description copied from interface:SelectionQueryEnable/disable query plan caching for this query.- Specified by:
setQueryPlanCacheablein interfaceSelectionQuery<R>- See Also:
-
getCacheRegion
Description copied from interface:SelectionQueryObtain the name of the second level query cache region in which query results will be stored (if they are cached, see the discussion onSelectionQuery.isCacheable()for more information).nullindicates that the default region should be used.- Specified by:
getCacheRegionin interfaceSelectionQuery<R>
-
getLockOptions
Deprecated.Description copied from interface:SelectionQueryTheLockOptionscurrently in effect for the query- Specified by:
getLockOptionsin interfaceSelectionQuery<R>
-
getLockMode
Description copied from interface:SelectionQueryGet the rootLockModeTypefor the query- Specified by:
getLockModein interfaceSelectionQuery<R>- See Also:
-
setLockMode
Description copied from interface:SelectionQuerySpecify the rootLockModeTypefor the query- Specified by:
setLockModein interfaceSelectionQuery<R>- See Also:
-
getHibernateLockMode
Description copied from interface:SelectionQueryGet the rootLockModefor the query- Specified by:
getHibernateLockModein interfaceSelectionQuery<R>- See Also:
-
setHibernateLockMode
Description copied from interface:SelectionQuerySpecify the rootLockModefor the query- Specified by:
setHibernateLockModein interfaceSelectionQuery<R>- See Also:
-
setLockMode
Description copied from interface:SelectionQuerySpecify aLockModeto apply to a specific alias defined in the query- Specified by:
setLockModein interfaceSelectionQuery<R>- See Also:
-
setTimeout
Description copied from interface:CommonQueryContractApply a timeout to the corresponding database query.- Specified by:
setTimeoutin interfaceCommonQueryContract- Parameters:
timeout- The timeout to apply- Returns:
this, for method chaining
-
setLockScope
Description copied from interface:SelectionQueryApply a scope to any pessimistic locking applied to the query.- Specified by:
setLockScopein interfaceSelectionQuery<R>- Parameters:
lockScope- The lock scope to apply- Returns:
this, for method chaining
-
setFollowOnStrategy
Description copied from interface:SelectionQuerySpecifies whether follow-on locking should be applied- Specified by:
setFollowOnStrategyin interfaceSelectionQuery<R>
-
setLockScope
Description copied from interface:SelectionQueryApply a scope to any pessimistic locking applied to the query.- Specified by:
setLockScopein interfaceSelectionQuery<R>- Parameters:
lockScope- The lock scope to apply- Returns:
this, for method chaining
-
setFollowOnLocking
Description copied from interface:SelectionQuerySpecifies whether follow-on locking should be applied- Specified by:
setFollowOnLockingin interfaceSelectionQuery<R>
-
getQueryString
- Specified by:
getQueryStringin interfaceSqmQuery<R>
-
getSqmStatement
- Specified by:
getSqmStatementin interfaceSqmQuery<R>
-
getParameterMetadata
Description copied from interface:CommonQueryContractGet theParameterMetadataobject representing the parameters of this query, and providing access to theQueryParameters.- Specified by:
getParameterMetadatain interfaceCommonQueryContract- Specified by:
getParameterMetadatain interfaceSqmQuery<R>
-
getQueryOptions
- Specified by:
getQueryOptionsin interfaceSqmQuery<R>
-
setParameter
Description copied from interface:CommonQueryContractBind the given argument to a named query parameter.If the type of the parameter cannot be inferred from the context in which it occurs, use one of the overloads which accepts a "type", or pass a
TypedParameterValue.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind the given argument to a named query parameter using the givenClassreference to attempt to infer theType. If unable to infer an appropriateType, fall back toCommonQueryContract.setParameter(String, Object).- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind the given argument to a named query parameter using the givenType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>
-
setParameter
@Deprecated public SqmSelectionQueryImplementor<R> setParameter(String name, Instant value, TemporalType temporalType) Deprecated.Description copied from interface:CommonQueryContractBind anInstantto the named query parameter using just the portion indicated by the givenTemporalType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>
-
setParameter
@Deprecated public SqmSelectionQueryImplementor<R> setParameter(String name, Calendar value, TemporalType temporalType) Deprecated.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- See Also:
-
setParameter
@Deprecated public SqmSelectionQueryImplementor<R> setParameter(String name, Date value, TemporalType temporalType) Deprecated.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind the given argument to an ordinal query parameter.If the type of the parameter cannot be inferred from the context in which it occurs, use one of the overloads which accepts a "type", or pass a
TypedParameterValue.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind the given argument to an ordinal query parameter using the givenClassreference to attempt to infer theType. If unable to infer an appropriateType, fall back toCommonQueryContract.setParameter(int, Object).- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind the given argument to an ordinal query parameter using the givenType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>
-
setParameter
@Deprecated public SqmSelectionQueryImplementor<R> setParameter(int position, Instant value, TemporalType temporalType) Deprecated.Description copied from interface:CommonQueryContractBind anInstantto an ordinal query parameter using just the portion indicated by the givenTemporalType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>
-
setParameter
@Deprecated public SqmSelectionQueryImplementor<R> setParameter(int position, Date value, TemporalType temporalType) Deprecated.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- See Also:
-
setParameter
@Deprecated public SqmSelectionQueryImplementor<R> setParameter(int position, Calendar value, TemporalType temporalType) Deprecated.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind an argument to the query parameter represented by the givenQueryParameter.If the type of the parameter cannot be inferred from the context in which it occurs, use one of the overloads which accepts a "type".
- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Parameters:
parameter- the query parameter mementovalue- the argument, which might be null- Returns:
this, for method chaining- See Also:
-
setParameter
public <P> SqmSelectionQueryImplementor<R> setParameter(QueryParameter<P> parameter, P value, Class<P> type) Description copied from interface:CommonQueryContractBind an argument to the query parameter represented by the givenQueryParameter, using the givenClassreference to attempt to infer theTypeto use. If unable to infer an appropriateType, fall back toCommonQueryContract.setParameter(QueryParameter, Object).- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Parameters:
parameter- the query parameter mementovalue- the argument, which might be nulltype- aTyperepresenting the type of the parameter- Returns:
this, for method chaining- See Also:
-
setParameter
public <P> SqmSelectionQueryImplementor<R> setParameter(QueryParameter<P> parameter, P val, Type<P> type) Description copied from interface:CommonQueryContractBind an argument to the query parameter represented by the givenQueryParameter, using the givenType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Parameters:
parameter- the query parameter mementoval- the argument, which might be nulltype- aTyperepresenting the type of the parameter- Returns:
this, for method chaining
-
setParameter
- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- See Also:
-
setParameter
@Deprecated public SqmSelectionQueryImplementor<R> setParameter(Parameter<Calendar> param, Calendar value, TemporalType temporalType) Deprecated.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- See Also:
-
setParameter
@Deprecated public SqmSelectionQueryImplementor<R> setParameter(Parameter<Date> param, Date value, TemporalType temporalType) Deprecated.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- See Also:
-
setParameterList
Description copied from interface:CommonQueryContractBind multiple arguments to a named query parameter.The "type mapping" for the binding is inferred from the type of the first collection element.
- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
public <P> SqmSelectionQueryImplementor<R> setParameterList(String name, Collection<? extends P> values, Class<P> javaType) Description copied from interface:CommonQueryContractBind multiple arguments to a named query parameter using the givenClassreference to attempt to infer theTypeIf unable to infer an appropriateType, fall back toCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
public <P> SqmSelectionQueryImplementor<R> setParameterList(String name, Collection<? extends P> values, Type<P> type) Description copied from interface:CommonQueryContractBind multiple arguments to a named query parameter using the givenType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
Description copied from interface:CommonQueryContractBind multiple arguments to a named query parameter.The "type mapping" for the binding is inferred from the type of the first collection element
- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
public <P> SqmSelectionQueryImplementor<R> setParameterList(String name, P[] values, Class<P> javaType) Description copied from interface:CommonQueryContractBind multiple arguments to a named query parameter using the given Class reference to attempt to determine theTypeto use. If unable to determine an appropriateType,CommonQueryContract.setParameterList(String, Collection)is used- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
Description copied from interface:CommonQueryContractBind multiple arguments to a named query parameter using the givenType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
Description copied from interface:CommonQueryContractBind multiple arguments to an ordinal query parameter.The "type mapping" for the binding is inferred from the type of the first collection element
- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
public <P> SqmSelectionQueryImplementor<R> setParameterList(int position, Collection<? extends P> values, Class<P> javaType) Description copied from interface:CommonQueryContractBind multiple arguments to an ordinal query parameter using the givenClassreference to attempt to infer theType. If unable to infer an appropriateType, fall back toCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
public <P> SqmSelectionQueryImplementor<R> setParameterList(int position, Collection<? extends P> values, Type<P> type) Description copied from interface:CommonQueryContractBind multiple arguments to an ordinal query parameter using the givenType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
Description copied from interface:CommonQueryContractBind multiple arguments to an ordinal query parameter.The "type mapping" for the binding is inferred from the type of the first collection element
- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
public <P> SqmSelectionQueryImplementor<R> setParameterList(int position, P[] values, Class<P> javaType) Description copied from interface:CommonQueryContractBind multiple arguments to an ordinal query parameter using the givenClassreference to attempt to infer theType. If unable to infer an appropriateType, fall back toCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
Description copied from interface:CommonQueryContractBind multiple arguments to an ordinal query parameter using the givenType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
public <P> SqmSelectionQueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values) Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameter.The type of the parameter is inferred from the context in which it occurs, and from the type of the first given argument.
- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Parameters:
parameter- the parameter mementovalues- a collection of arguments- Returns:
this, for method chaining
-
setParameterList
public <P> SqmSelectionQueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Class<P> javaType) Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameterusing the givenClassreference to attempt to infer theTypeto use. If unable to infer an appropriateType, fall back to usingCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
public <P> SqmSelectionQueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Type<P> type) Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameter, using the givenType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
public <P> SqmSelectionQueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values) Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameter.The type of the parameter is inferred between the context in which it occurs, the type associated with the
QueryParameterand the type of the first given argument.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Parameters:
parameter- the parameter mementovalues- a collection of arguments- Returns:
this, for method chaining
-
setParameterList
public <P> SqmSelectionQueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, Class<P> javaType) Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameterusing the givenClassreference to attempt to infer theTypeto use. If unable to infer an appropriateType, fall back to usingCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
public <P> SqmSelectionQueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, Type<P> type) Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameter, using the given theType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Returns:
this, for method chaining
-
setProperties
Description copied from interface:CommonQueryContractBind 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.- Specified by:
setPropertiesin interfaceCommonQueryContract- Specified by:
setPropertiesin interfaceSelectionQuery<R>- Specified by:
setPropertiesin interfaceSqmQuery<R>- Specified by:
setPropertiesin interfaceSqmSelectionQuery<R>- Parameters:
bean- any JavaBean or POJO- Returns:
this, for method chaining
-
setProperties
Description copied from interface:CommonQueryContractBind the values of the givenMapto named parameters of the query, matching key names with parameter names and mapping value types to Hibernate types using heuristics.- Specified by:
setPropertiesin interfaceCommonQueryContract- Specified by:
setPropertiesin interfaceSelectionQuery<R>- Specified by:
setPropertiesin interfaceSqmQuery<R>- Specified by:
setPropertiesin interfaceSqmSelectionQuery<R>- Parameters:
bean- aMapof names to arguments- Returns:
this, for method chaining
-
setHibernateFlushMode
Deprecated.Description copied from interface:CommonQueryContractSet the currentFlushModein effect for this query.- Specified by:
setHibernateFlushModein interfaceCommonQueryContract- Specified by:
setHibernateFlushModein interfaceSelectionQuery<R>- Specified by:
setHibernateFlushModein interfaceSqmQuery<R>- Specified by:
setHibernateFlushModein interfaceSqmSelectionQuery<R>- See Also:
-
setCacheMode
Description copied from interface:SelectionQuerySet the currentCacheModein effect for this query.Set it to
nullto indicate that theCacheModeof thesessionshould be used.- Specified by:
setCacheModein interfaceSelectionQuery<R>- Specified by:
setCacheModein interfaceSqmSelectionQuery<R>- See Also:
-
setCacheable
Description copied from interface:SelectionQueryEnable/disable second level query (result) caching for this query.- Specified by:
setCacheablein interfaceSelectionQuery<R>- Specified by:
setCacheablein interfaceSqmSelectionQuery<R>- See Also:
-
setCacheRegion
Description copied from interface:SelectionQuerySet the name of the cache region where query results should be cached (assumingSelectionQuery.isCacheable()).nullindicates to use the default region.- Specified by:
setCacheRegionin interfaceSelectionQuery<R>- Specified by:
setCacheRegionin interfaceSqmSelectionQuery<R>- See Also:
-
setTimeout
Description copied from interface:CommonQueryContractSet the query timeout in seconds.Any value set here is eventually passed directly along to the JDBC statement, which expressly disallows negative values. So negative values should be avoided as a general rule, although certain "magic values" are handled - see Timeouts.NO_WAIT.
A value of zero indicates no timeout.
- Specified by:
setTimeoutin interfaceCommonQueryContract- Specified by:
setTimeoutin interfaceSelectionQuery<R>- Specified by:
setTimeoutin interfaceSqmSelectionQuery<R>- Parameters:
timeout- the timeout in seconds- Returns:
this, for method chaining- See Also:
-
setFetchSize
Description copied from interface:SelectionQuerySets a JDBC fetch size hint for the query.- Specified by:
setFetchSizein interfaceSelectionQuery<R>- Specified by:
setFetchSizein interfaceSqmSelectionQuery<R>- Parameters:
fetchSize- the fetch size hint- Returns:
this, for method chaining- See Also:
-
setReadOnly
Description copied from interface:SelectionQuerySet the read-only/modifiable mode for entities and proxies loaded by thisQuery. This setting overrides the default setting for the persistence context,Session.isDefaultReadOnly().To set the default read-only/modifiable setting used for entities and proxies that are loaded into the session, use
Session.setDefaultReadOnly(boolean).Read-only entities are not dirty-checked and snapshots of persistent state are not maintained. Read-only entities can be modified, but changes are not persisted.
When a proxy is initialized, the loaded entity will have the same read-only/modifiable setting as the uninitialized proxy has, regardless of the session's current setting.
The read-only/modifiable setting has no impact on entities/proxies returned by the query that existed in the session beforeQuery the query was executed.
- Specified by:
setReadOnlyin interfaceSelectionQuery<R>- Specified by:
setReadOnlyin interfaceSqmSelectionQuery<R>- Parameters:
readOnly-trueindicates that entities and proxies loaded by the query are to be put in read-only mode;falseindicates that entities and proxies loaded by the query will be put in modifiable mode- Returns:
this, for method chaining
-
executeQuery
- Specified by:
executeQueryin interfaceSqmSelectionQueryImplementor<R>
-
setTupleTransformer
Description copied from interface:SelectionQuerySet aTupleTransformer.- Specified by:
setTupleTransformerin interfaceSelectionQuery<R>- Specified by:
setTupleTransformerin interfaceSqmSelectionQuery<R>
-
setResultListTransformer
Description copied from interface:SelectionQuerySet aResultListTransformer.- Specified by:
setResultListTransformerin interfaceSelectionQuery<R>- Specified by:
setResultListTransformerin interfaceSqmSelectionQuery<R>
-