Package org.hibernate.query.spi
Interface QueryParameterBindings
- All Known Implementing Classes:
ProcedureParamBindings
,QueryParameterBindingsImpl
Manages all the parameter bindings for a particular query.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final QueryParameterBindings
Deprecated, for removal: This API element is subject to removal in a future version.static final QueryKey.ParameterBindingsMemento
-
Method Summary
Modifier and TypeMethodDescriptionstatic QueryParameterBindings
empty()
generateQueryKeyMemento
(SharedSessionContractImplementor persistenceContext) Generate a "memento" for these parameter bindings that can be used in creating aQueryKey
<P> QueryParameterBinding<P>
getBinding
(int position) Access to the binding via position<P> QueryParameterBinding<P>
getBinding
(String name) Access to the binding via namedefault <P> QueryParameterBinding<P>
getBinding
(QueryParameter<P> parameter) Access to the binding via QueryParameter reference<P> QueryParameterBinding<P>
getBinding
(QueryParameterImplementor<P> parameter) Access to the binding via QueryParameter referenceboolean
boolean
isBound
(QueryParameterImplementor<?> parameter) Has binding been done for the given parameter.void
validate()
Validate the bindings.void
visitBindings
(BiConsumer<QueryParameterImplementor<?>, QueryParameterBinding<?>> action)
-
Field Details
-
NO_PARAMETER_BINDING_MEMENTO
-
NO_PARAM_BINDINGS
Deprecated, for removal: This API element is subject to removal in a future version.Useempty()
instead.
-
-
Method Details
-
isBound
Has binding been done for the given parameter. Handles cases where we do not (yet) have a binding object as well by simply returning false.- Parameters:
parameter
- The parameter to check for a binding- Returns:
true
if its value has been bound;false
otherwise.
-
getBinding
Access to the binding via QueryParameter reference- Parameters:
parameter
- The QueryParameter reference- Returns:
- The binding, or
null
if not yet bound
-
getBinding
Access to the binding via QueryParameter reference- Parameters:
parameter
- The QueryParameter reference- Returns:
- The binding, or
null
if not yet bound
-
getBinding
Access to the binding via name- Parameters:
name
- The parameter name- Returns:
- The binding, or
null
if not yet bound
-
getBinding
Access to the binding via position- Parameters:
position
- The parameter position- Returns:
- The binding, or
null
if not yet bound
-
validate
void validate()Validate the bindings. Called just before execution -
hasAnyMultiValuedBindings
boolean hasAnyMultiValuedBindings() -
visitBindings
-
empty
-
empty()
instead.