Package org.hibernate.query.spi
Interface QueryParameterBinding<T>
- All Known Subinterfaces:
ProcedureParameterBinding<T>
,ProcedureParameterBindingImplementor<T>
- All Known Implementing Classes:
ProcedureParameterBindingImpl
,QueryParameterBindingImpl
The value/type binding information for a particular query parameter. Supports
both single-valued and multivalued binds
-
Method Summary
Modifier and TypeMethodDescriptionBindableType<? super T>
Get the Type currently associated with this binding.Get the value current bound.Collection<? extends T>
Get the values currently bound.If the parameter represents a temporal type, return the explicitly specified precision - if one.getType()
Returns the inferred mapping model expressible i.e.boolean
isBound()
Is any value (includingnull
) bound? Asked another way, were any of the `#set` methods called?boolean
Is the binding multivalued?default void
setBindValue
(T value) Sets the parameter binding value.void
setBindValue
(T value, boolean resolveJdbcTypeIfNecessary) Sets the parameter binding value.void
setBindValue
(T value, TemporalType temporalTypePrecision) Sets the parameter binding value using the explicit TemporalType.void
setBindValue
(T value, BindableType<T> clarifiedType) Sets the parameter binding value using the explicit Type.void
setBindValues
(Collection<? extends T> values) Sets the parameter binding values.void
setBindValues
(Collection<? extends T> values, TemporalType temporalTypePrecision, TypeConfiguration typeConfiguration) Sets the parameter binding value using the explicit TemporalType in regards to the individual values.void
setBindValues
(Collection<? extends T> values, BindableType<T> clarifiedType) Sets the parameter binding values using the explicit Type in regards to the individual values.boolean
setType
(MappingModelExpressible<T> type) Sets the mapping model expressible for this parameter.
-
Method Details
-
isBound
boolean isBound()Is any value (includingnull
) bound? Asked another way, were any of the `#set` methods called? -
isMultiValued
boolean isMultiValued()Is the binding multivalued? -
getQueryParameter
QueryParameter<T> getQueryParameter() -
getBindType
BindableType<? super T> getBindType()Get the Type currently associated with this binding.- Returns:
- The currently associated Type
-
getExplicitTemporalPrecision
TemporalType getExplicitTemporalPrecision()If the parameter represents a temporal type, return the explicitly specified precision - if one. -
setBindValue
Sets the parameter binding value. The inherent parameter type (if known) is assumed -
setBindValue
Sets the parameter binding value. The inherent parameter type (if known) is assumed. The flag controls whether the parameter type should be resolved if necessary. -
setBindValue
Sets the parameter binding value using the explicit Type.- Parameters:
value
- The bind valueclarifiedType
- The explicit Type to use
-
setBindValue
Sets the parameter binding value using the explicit TemporalType.- Parameters:
value
- The bind valuetemporalTypePrecision
- The temporal type to use
-
getBindValue
T getBindValue()Get the value current bound.- Returns:
- The currently bound value
-
setBindValues
Sets the parameter binding values. The inherent parameter type (if known) is assumed in regards to the individual values.- Parameters:
values
- The bind values
-
setBindValues
Sets the parameter binding values using the explicit Type in regards to the individual values.- Parameters:
values
- The bind valuesclarifiedType
- The explicit Type to use
-
setBindValues
void setBindValues(Collection<? extends T> values, TemporalType temporalTypePrecision, TypeConfiguration typeConfiguration) Sets the parameter binding value using the explicit TemporalType in regards to the individual values.- Parameters:
values
- The bind valuestemporalTypePrecision
- The temporal type to use
-
getBindValues
Collection<? extends T> getBindValues()Get the values currently bound.- Returns:
- The currently bound values
-
getType
MappingModelExpressible<T> getType()Returns the inferred mapping model expressible i.e. the model reference against which this parameter is compared.- Returns:
- the inferred mapping model expressible or
null
-
setType
Sets the mapping model expressible for this parameter.- Parameters:
type
- The mapping model expressible- Returns:
- Whether the bind type was changed
-