Package org.hibernate.query.spi
Interface QueryParameterBinding<T>
-
- All Known Subinterfaces:
ProcedureParameterBinding<T>
,ProcedureParameterBindingImplementor<T>
- All Known Implementing Classes:
ProcedureParameterBindingImpl
,QueryParameterBindingImpl
@Incubating public interface QueryParameterBinding<T>
/** The value/type binding information for a particular query parameter. Supports both single-valued and multi-valued binds
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description BindableType<? extends T>
getBindType()
Get the Type currently associated with this binding.T
getBindValue()
Get the value current bound.Collection<? extends T>
getBindValues()
Get the values currently bound.TemporalType
getExplicitTemporalPrecision()
If the parameter represents a temporal type, return the explicitly specified precision - if one.MappingModelExpressible<T>
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
isMultiValued()
Is the binding multi-valued?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 Detail
-
isBound
boolean isBound()
Is any value (includingnull
) bound? Asked another way, were any of the `#set` methods called?
-
isMultiValued
boolean isMultiValued()
Is the binding multi-valued?
-
getBindType
BindableType<? extends 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
default void setBindValue(T value)
Sets the parameter binding value. The inherent parameter type (if known) is assumed
-
setBindValue
void setBindValue(T value, boolean resolveJdbcTypeIfNecessary)
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
void setBindValue(T value, BindableType<T> clarifiedType)
Sets the parameter binding value using the explicit Type.- Parameters:
value
- The bind valueclarifiedType
- The explicit Type to use
-
setBindValue
void setBindValue(T value, TemporalType temporalTypePrecision)
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
void setBindValues(Collection<? extends T> values)
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
void setBindValues(Collection<? extends T> values, BindableType<T> clarifiedType)
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
boolean setType(MappingModelExpressible<T> type)
Sets the mapping model expressible for this parameter.- Parameters:
type
- The mapping model expressible- Returns:
- Whether the bind type was changed
-
-