Interface SqmQuery<R>
- All Superinterfaces:
CommonQueryContract
- All Known Subinterfaces:
SqmQueryImplementor<R>,SqmSelectionQuery<R>,SqmSelectionQueryImplementor<R>
- All Known Implementing Classes:
DelegatingSqmSelectionQueryImplementor,SqmQueryImpl,SqmSelectionQueryImpl
-
Method Summary
Modifier and TypeMethodDescriptionGet theParameterMetadataobject representing the parameters of this query, and providing access to theQueryParameters.setHibernateFlushMode(FlushMode flushMode) Deprecated.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.Methods inherited from interface org.hibernate.query.CommonQueryContract
getComment, getFlushMode, getHibernateFlushMode, getQueryFlushMode, getTimeout, setComment, setFlushMode, setHint, setTimeout, setTimeout
-
Method Details
-
getQueryString
String getQueryString() -
getSqmStatement
SqmStatement<R> getSqmStatement() -
getParameterMetadata
ParameterMetadata getParameterMetadata()Description copied from interface:CommonQueryContractGet theParameterMetadataobject representing the parameters of this query, and providing access to theQueryParameters.- Specified by:
getParameterMetadatain interfaceCommonQueryContract
-
getQueryOptions
QueryOptions getQueryOptions() -
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- 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- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind the given argument to a named query parameter using the givenType.- Specified by:
setParameterin interfaceCommonQueryContract
-
setParameter
@Deprecated(since="7") SqmQuery<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
-
setParameter
@Deprecated(since="7") SqmQuery<R> setParameter(String name, Calendar value, TemporalType temporalType) Deprecated.- Specified by:
setParameterin interfaceCommonQueryContract- See Also:
-
setParameter
Deprecated.- Specified by:
setParameterin interfaceCommonQueryContract- 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- 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- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind the given argument to an ordinal query parameter using the givenType.- Specified by:
setParameterin interfaceCommonQueryContract
-
setParameter
@Deprecated(since="7") SqmQuery<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
-
setParameter
@Deprecated(since="7") SqmQuery<R> setParameter(int position, Date value, TemporalType temporalType) Deprecated.- Specified by:
setParameterin interfaceCommonQueryContract- See Also:
-
setParameter
@Deprecated(since="7") SqmQuery<R> setParameter(int position, Calendar value, TemporalType temporalType) Deprecated.- Specified by:
setParameterin interfaceCommonQueryContract- 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- Parameters:
parameter- the query parameter mementovalue- the argument, which might be null- Returns:
this, for method chaining- See Also:
-
setParameter
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- 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
Description copied from interface:CommonQueryContractBind an argument to the query parameter represented by the givenQueryParameter, using the givenType.- Specified by:
setParameterin interfaceCommonQueryContract- 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- See Also:
-
setParameter
@Deprecated(since="7") SqmQuery<R> setParameter(Parameter<Calendar> param, Calendar value, TemporalType temporalType) Deprecated.- Specified by:
setParameterin interfaceCommonQueryContract- See Also:
-
setParameter
@Deprecated(since="7") SqmQuery<R> setParameter(Parameter<Date> param, Date value, TemporalType temporalType) Deprecated.- Specified by:
setParameterin interfaceCommonQueryContract- 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- Returns:
this, for method chaining- See Also:
-
setParameterList
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- 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- 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- Returns:
this, for method chaining
-
setParameterList
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- 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- 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- Returns:
this, for method chaining
-
setParameterList
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- 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- 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- Returns:
this, for method chaining
-
setParameterList
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- 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- Returns:
this, for method chaining
-
setParameterList
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- Parameters:
parameter- the parameter mementovalues- a collection of arguments- Returns:
this, for method chaining
-
setParameterList
<P> SqmQuery<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- Returns:
this, for method chaining- See Also:
-
setParameterList
<P> SqmQuery<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- Returns:
this, for method chaining
-
setParameterList
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- Parameters:
parameter- the parameter mementovalues- a collection of arguments- Returns:
this, for method chaining
-
setParameterList
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- Returns:
this, for method chaining- See Also:
-
setParameterList
Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameter, using the given theType.- Specified by:
setParameterListin interfaceCommonQueryContract- 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- 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- 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- See Also:
-
setQueryFlushMode
Description copied from interface:CommonQueryContractSet theQueryFlushModeto use for this query.- Specified by:
setQueryFlushModein interfaceCommonQueryContract- See Also:
-