Interface SqmSelectionQuery<R>
- All Superinterfaces:
CommonQueryContract,SelectionQuery<R>,SqmQuery
- All Known Subinterfaces:
SqmSelectionQueryImplementor<R>
- All Known Implementing Classes:
DelegatingSqmSelectionQueryImplementor,SqmSelectionQueryImpl
public interfaceSqmSelectionQuery<R>extendsSqmQuery,SelectionQuery<R>
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SqmSelectionQuery<R>setCacheable(boolean cacheable)Enable/disable second level query (result) caching for this query.SqmSelectionQuery<R>setCacheMode(CacheMode cacheMode)Set the currentCacheModein effect for this query.SqmSelectionQuery<R>setCacheRegion(String cacheRegion)Set the name of the cache region where query results should be cached (assumingSelectionQuery.isCacheable()).SqmSelectionQuery<R>setFetchSize(int fetchSize)Sets a JDBC fetch size hint for the query.SqmSelectionQuery<R>setHibernateFlushMode(FlushMode flushMode)Set the currentFlushModein effect for this query.SqmSelectionQuery<R>setParameter(int position,Object value)Bind the given argument to an ordinal query parameter.SqmSelectionQuery<R>setParameter(int position,Instant value,TemporalType temporalType)Bind anInstantto an ordinal query parameter using just the portion indicated by the givenTemporalType.SqmSelectionQuery<R>setParameter(int position,Calendar value,TemporalType temporalType)SqmSelectionQuery<R>setParameter(int position,Date value,TemporalType temporalType)<P> SqmSelectionQuery<R>setParameter(int position, P value,Class<P> type)Bind the given argument to an ordinal query parameter using the givenClassreference to attempt to infer theBindableType.<P> SqmSelectionQuery<R>setParameter(int position, P value,BindableType<P> type)Bind the given argument to an ordinal query parameter using the givenBindableType.SqmSelectionQuery<R>setParameter(Parameter<Calendar> param,Calendar value,TemporalType temporalType)SqmSelectionQuery<R>setParameter(Parameter<Date> param,Date value,TemporalType temporalType)<T> SqmSelectionQuery<R>setParameter(Parameter<T> param, T value)SqmSelectionQuery<R>setParameter(String name,Object value)Bind the given argument to a named query parameter.SqmSelectionQuery<R>setParameter(String name,Instant value,TemporalType temporalType)Bind anInstantto the named query parameter using just the portion indicated by the givenTemporalType.SqmSelectionQuery<R>setParameter(String name,Calendar value,TemporalType temporalType)SqmSelectionQuery<R>setParameter(String name,Date value,TemporalType temporalType)<P> SqmSelectionQuery<R>setParameter(String name, P value,Class<P> type)Bind the given argument to a named query parameter using the givenClassreference to attempt to infer theBindableType.<P> SqmSelectionQuery<R>setParameter(String name, P value,BindableType<P> type)Bind the given argument to a named query parameter using the givenBindableType.<P> SqmSelectionQuery<R>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 theBindableTypeto use.<P> SqmSelectionQuery<R>setParameter(QueryParameter<P> parameter, P val,BindableType<P> type)Bind an argument to the query parameter represented by the givenQueryParameter, using the givenBindableType.<T> SqmSelectionQuery<R>setParameter(QueryParameter<T> parameter, T value)Bind an argument to the query parameter represented by the givenQueryParameter.SqmSelectionQuery<R>setParameterList(int position,Object[] values)Bind multiple arguments to an ordinal query parameter.SqmSelectionQuery<R>setParameterList(int position,Collection values)Bind multiple arguments to an ordinal query parameter.<P> SqmSelectionQuery<R>setParameterList(int position,Collection<? extends P> values,Class<P> javaType)Bind multiple arguments to an ordinal query parameter using the givenClassreference to attempt to infer theBindableType.<P> SqmSelectionQuery<R>setParameterList(int position,Collection<? extends P> values,BindableType<P> type)Bind multiple arguments to an ordinal query parameter using the givenBindableType.<P> SqmSelectionQuery<R>setParameterList(int position, P[] values,Class<P> javaType)Bind multiple arguments to an ordinal query parameter using the givenClassreference to attempt to infer theBindableType.<P> SqmSelectionQuery<R>setParameterList(int position, P[] values,BindableType<P> type)Bind multiple arguments to an ordinal query parameter using the givenBindableType.SqmSelectionQuery<R>setParameterList(String name,Object[] values)Bind multiple arguments to a named query parameter.SqmSelectionQuery<R>setParameterList(String name,Collection values)Bind multiple arguments to a named query parameter.<P> SqmSelectionQuery<R>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 theBindableTypeIf unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameterList(String, Collection).<P> SqmSelectionQuery<R>setParameterList(String name,Collection<? extends P> values,BindableType<P> type)Bind multiple arguments to a named query parameter using the givenBindableType.<P> SqmSelectionQuery<R>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 theBindableTypeto use.<P> SqmSelectionQuery<R>setParameterList(String name, P[] values,BindableType<P> type)Bind multiple arguments to a named query parameter using the givenBindableType.<P> SqmSelectionQuery<R>setParameterList(QueryParameter<P> parameter,Collection<? extends P> values)Bind multiple arguments to the query parameter represented by the givenQueryParameter.<P> SqmSelectionQuery<R>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 theBindableTypeto use.<P> SqmSelectionQuery<R>setParameterList(QueryParameter<P> parameter,Collection<? extends P> values,BindableType<P> type)Bind multiple arguments to the query parameter represented by the givenQueryParameter, using the givenBindableType.<P> SqmSelectionQuery<R>setParameterList(QueryParameter<P> parameter, P[] values)Bind multiple arguments to the query parameter represented by the givenQueryParameter.<P> SqmSelectionQuery<R>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 theBindableTypeto use.<P> SqmSelectionQuery<R>setParameterList(QueryParameter<P> parameter, P[] values,BindableType<P> type)Bind multiple arguments to the query parameter represented by the givenQueryParameter, using the given theBindableType.SqmSelectionQuery<R>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.SqmSelectionQuery<R>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.SqmSelectionQuery<R>setReadOnly(boolean readOnly)Set the read-only/modifiable mode for entities and proxies loaded by thisQuery.SqmSelectionQuery<R>setTimeout(int timeout)Set the query timeoutin seconds.Methods inherited from interface org.hibernate.query.CommonQueryContract
getComment,getFlushMode,getHibernateFlushMode,getTimeout
Methods inherited from interface org.hibernate.query.SelectionQuery
disableFetchProfile,enableFetchProfile,getCacheMode,getCacheRegion,getCacheRetrieveMode,getCacheStoreMode,getFetchSize,getFirstResult,getHibernateLockMode,getKeyedResultList,getLockMode,getLockOptions,getMaxResults,getResultCount,getResultList,getResultStream,getSingleResult,getSingleResultOrNull,isCacheable,isQueryPlanCacheable,isReadOnly,list,scroll,scroll,setAliasSpecificLockMode,setCacheRetrieveMode,setCacheStoreMode,setComment,setEntityGraph,setFirstResult,setFlushMode,setFollowOnLocking,setHibernateLockMode,setHint,setLockMode,setLockMode,setMaxResults,setOrder,setOrder,setPage,setQueryPlanCacheable,stream,uniqueResult,uniqueResultOptional
Methods inherited from interface org.hibernate.query.spi.SqmQuery
getParameterMetadata,getQueryOptions,getQueryString,getSqmStatement
Method Detail
setParameter
SqmSelectionQuery<R> setParameter(String name,Object value)
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 forms which accepts a "type".
- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- See Also:
CommonQueryContract.setParameter(String, Object, Class),CommonQueryContract.setParameter(String, Object, BindableType)
setParameter
<P> SqmSelectionQuery<R> setParameter(String name, P value,Class<P> type)
Description copied from interface:CommonQueryContractBind the given argument to a named query parameter using the givenClassreference to attempt to infer theBindableType. If unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameter(String, Object).- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- See Also:
CommonQueryContract.setParameter(String, Object, BindableType)
setParameter
<P> SqmSelectionQuery<R> setParameter(String name, P value,BindableType<P> type)
Description copied from interface:CommonQueryContractBind the given argument to a named query parameter using the givenBindableType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery
setParameter
SqmSelectionQuery<R> setParameter(String name,Instant value,TemporalType temporalType)
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
setParameter
SqmSelectionQuery<R> setParameter(String name,Calendar value,TemporalType temporalType)
- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- See Also:
Query.setParameter(String, Calendar, TemporalType)
setParameter
SqmSelectionQuery<R> setParameter(String name,Date value,TemporalType temporalType)
- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- See Also:
Query.setParameter(String, Date, TemporalType)
setParameter
SqmSelectionQuery<R> setParameter(int position,Object value)
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 forms which accepts a "type".
- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- See Also:
CommonQueryContract.setParameter(int, Object, Class),CommonQueryContract.setParameter(int, Object, BindableType)
setParameter
<P> SqmSelectionQuery<R> setParameter(int position, P value,Class<P> type)
Description copied from interface:CommonQueryContractBind the given argument to an ordinal query parameter using the givenClassreference to attempt to infer theBindableType. If unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameter(int, Object).- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- See Also:
CommonQueryContract.setParameter(int, Object, BindableType)
setParameter
<P> SqmSelectionQuery<R> setParameter(int position, P value,BindableType<P> type)
Description copied from interface:CommonQueryContractBind the given argument to an ordinal query parameter using the givenBindableType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery
setParameter
SqmSelectionQuery<R> setParameter(int position,Instant value,TemporalType temporalType)
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
setParameter
SqmSelectionQuery<R> setParameter(int position,Date value,TemporalType temporalType)
- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- See Also:
Query.setParameter(int, Date, TemporalType)
setParameter
SqmSelectionQuery<R> setParameter(int position,Calendar value,TemporalType temporalType)
- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- See Also:
Query.setParameter(int, Calendar, TemporalType)
setParameter
<T> SqmSelectionQuery<R> setParameter(QueryParameter<T> parameter, T value)
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 forms which accepts a "type".
- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Parameters:
parameter- the query parameter mementovalue- the argument, which might be null- Returns:
this, for method chaining- See Also:
CommonQueryContract.setParameter(QueryParameter, Object, BindableType)
setParameter
<P> SqmSelectionQuery<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 theBindableTypeto use. If unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameter(QueryParameter, Object).- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Parameters:
parameter- the query parameter mementovalue- the argument, which might be nulltype- aBindableTyperepresenting the type of the parameter- Returns:
this, for method chaining- See Also:
CommonQueryContract.setParameter(QueryParameter, Object, BindableType)
setParameter
<P> SqmSelectionQuery<R> setParameter(QueryParameter<P> parameter, P val,BindableType<P> type)
Description copied from interface:CommonQueryContractBind an argument to the query parameter represented by the givenQueryParameter, using the givenBindableType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Parameters:
parameter- the query parameter mementoval- the argument, which might be nulltype- aBindableTyperepresenting the type of the parameter- Returns:
this, for method chaining
setParameter
<T> SqmSelectionQuery<R> setParameter(Parameter<T> param, T value)
- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- See Also:
Query.setParameter(Parameter, Object)
setParameter
SqmSelectionQuery<R> setParameter(Parameter<Calendar> param,Calendar value,TemporalType temporalType)
- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- See Also:
Query.setParameter(Parameter, Calendar, TemporalType)
setParameter
SqmSelectionQuery<R> setParameter(Parameter<Date> param,Date value,TemporalType temporalType)
- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- See Also:
Query.setParameter(Parameter, Date, TemporalType)
setParameterList
SqmSelectionQuery<R> setParameterList(String name,Collection values)
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- Returns:
this, for method chaining- See Also:
CommonQueryContract.setParameterList(java.lang.String, java.util.Collection, BindableType)
setParameterList
<P> SqmSelectionQuery<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 theBindableTypeIf unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Returns:
this, for method chaining- See Also:
CommonQueryContract.setParameterList(java.lang.String, java.util.Collection, BindableType)
setParameterList
<P> SqmSelectionQuery<R> setParameterList(String name,Collection<? extends P> values,BindableType<P> type)
Description copied from interface:CommonQueryContractBind multiple arguments to a named query parameter using the givenBindableType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Returns:
this, for method chaining
setParameterList
SqmSelectionQuery<R> setParameterList(String name,Object[] values)
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- Returns:
this, for method chaining
setParameterList
<P> SqmSelectionQuery<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 theBindableTypeto use. If unable to determine an appropriateBindableType,CommonQueryContract.setParameterList(String, Collection)is used- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Returns:
this, for method chaining- See Also:
CommonQueryContract.setParameterList(java.lang.String, Object[], BindableType)
setParameterList
<P> SqmSelectionQuery<R> setParameterList(String name, P[] values,BindableType<P> type)
Description copied from interface:CommonQueryContractBind multiple arguments to a named query parameter using the givenBindableType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Returns:
this, for method chaining
setParameterList
SqmSelectionQuery<R> setParameterList(int position,Collection values)
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- Returns:
this, for method chaining
setParameterList
<P> SqmSelectionQuery<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 theBindableType. If unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Returns:
this, for method chaining- See Also:
CommonQueryContract.setParameterList(int, Collection, BindableType)
setParameterList
<P> SqmSelectionQuery<R> setParameterList(int position,Collection<? extends P> values,BindableType<P> type)
Description copied from interface:CommonQueryContractBind multiple arguments to an ordinal query parameter using the givenBindableType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Returns:
this, for method chaining
setParameterList
SqmSelectionQuery<R> setParameterList(int position,Object[] values)
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- Returns:
this, for method chaining
setParameterList
<P> SqmSelectionQuery<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 theBindableType. If unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Returns:
this, for method chaining- See Also:
CommonQueryContract.setParameterList(int, Object[], BindableType)
setParameterList
<P> SqmSelectionQuery<R> setParameterList(int position, P[] values,BindableType<P> type)
Description copied from interface:CommonQueryContractBind multiple arguments to an ordinal query parameter using the givenBindableType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Returns:
this, for method chaining
setParameterList
<P> SqmSelectionQuery<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- Parameters:
parameter- the parameter mementovalues- a collection of arguments- Returns:
this, for method chaining
setParameterList
<P> SqmSelectionQuery<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 theBindableTypeto use. If unable to infer an appropriateBindableType, fall back to usingCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Returns:
this, for method chaining- See Also:
CommonQueryContract.setParameterList(QueryParameter, java.util.Collection, BindableType)
setParameterList
<P> SqmSelectionQuery<R> setParameterList(QueryParameter<P> parameter,Collection<? extends P> values,BindableType<P> type)
Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameter, using the givenBindableType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Returns:
this, for method chaining
setParameterList
<P> SqmSelectionQuery<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- Parameters:
parameter- the parameter mementovalues- a collection of arguments- Returns:
this, for method chaining
setParameterList
<P> SqmSelectionQuery<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 theBindableTypeto use. If unable to infer an appropriateBindableType, fall back to usingCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Returns:
this, for method chaining- See Also:
CommonQueryContract.setParameterList(QueryParameter, Object[], BindableType)
setParameterList
<P> SqmSelectionQuery<R> setParameterList(QueryParameter<P> parameter, P[] values,BindableType<P> type)
Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameter, using the given theBindableType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Returns:
this, for method chaining
setProperties
SqmSelectionQuery<R> setProperties(Object bean)
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- Parameters:
bean- any JavaBean or POJO- Returns:
this, for method chaining
setProperties
SqmSelectionQuery<R> setProperties(Map bean)
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- Parameters:
bean- aMapof names to arguments- Returns:
this, for method chaining
setHibernateFlushMode
SqmSelectionQuery<R> setHibernateFlushMode(FlushMode flushMode)
Description copied from interface:CommonQueryContractSet the currentFlushModein effect for this query.- Specified by:
setHibernateFlushModein interfaceCommonQueryContract- Specified by:
setHibernateFlushModein interfaceSelectionQuery<R>- Specified by:
setHibernateFlushModein interfaceSqmQuery- See Also:
CommonQueryContract.getHibernateFlushMode(),Session.getHibernateFlushMode()
setCacheMode
SqmSelectionQuery<R> setCacheMode(CacheMode cacheMode)
Description copied from interface:SelectionQuerySet the currentCacheModein effect for this query.- Specified by:
setCacheModein interfaceSelectionQuery<R>- See Also:
SelectionQuery.getCacheMode(),Session.setCacheMode(CacheMode)
setCacheable
SqmSelectionQuery<R> setCacheable(boolean cacheable)
Description copied from interface:SelectionQueryEnable/disable second level query (result) caching for this query.- Specified by:
setCacheablein interfaceSelectionQuery<R>- See Also:
SelectionQuery.isCacheable()
setCacheRegion
SqmSelectionQuery<R> setCacheRegion(String cacheRegion)
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>- See Also:
SelectionQuery.getCacheRegion()
setTimeout
SqmSelectionQuery<R> setTimeout(int timeout)
Description copied from interface:CommonQueryContractSet the query timeoutin seconds.Any value set here is eventually passed directly along to theJDBC statement, which expressly disallows negative values. So negative values should be avoided as a general rule.
A value of zero indicates no timeout.
- Specified by:
setTimeoutin interfaceCommonQueryContract- Specified by:
setTimeoutin interfaceSelectionQuery<R>- Parameters:
timeout- the timeoutin seconds- Returns:
this, for method chaining- See Also:
CommonQueryContract.getTimeout()
setFetchSize
SqmSelectionQuery<R> setFetchSize(int fetchSize)
Description copied from interface:SelectionQuerySets a JDBC fetch size hint for the query.- Specified by:
setFetchSizein interfaceSelectionQuery<R>- Parameters:
fetchSize- the fetch size hint- Returns:
this, for method chaining- See Also:
SelectionQuery.getFetchSize()
setReadOnly
SqmSelectionQuery<R> setReadOnly(boolean readOnly)
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>- 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