Package org.hibernate.query.internal
Class QueryParameterBindingImpl<T>
java.lang.Object
org.hibernate.query.internal.QueryParameterBindingImpl<T>
- All Implemented Interfaces:
QueryParameterBinding<T>,JavaType.CoercionContext
- Direct Known Subclasses:
ProcedureParameterBindingImpl
public class QueryParameterBindingImpl<T>
extends Object
implements QueryParameterBinding<T>, JavaType.CoercionContext
The standard implementation of
QueryParameterBinding.- Author:
- Steve Ebersole
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedQueryParameterBindingImpl(QueryParameter<T> queryParameter, SessionFactoryImplementor sessionFactory) Used byProcedureCallQueryParameterBindingImpl(QueryParameter<T> queryParameter, SessionFactoryImplementor sessionFactory, BindableType<T> bindType) Used by Query (SQM) and NativeQuery -
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. the model reference against which this parameter is compared.booleanisBound()Is any value (includingnull) bound?booleanIs the binding multivalued?voidsetBindValue(T value, boolean resolveJdbcTypeIfNecessary) Sets the parameter binding value.voidsetBindValue(T value, TemporalType temporalTypePrecision) Sets the parameter binding value using the explicit TemporalType.voidsetBindValue(T value, BindableType<T> clarifiedType) Sets the parameter binding value using the explicit Type.voidsetBindValues(Collection<? extends T> values) Sets the parameter binding values.voidsetBindValues(Collection<? extends T> values, TemporalType temporalTypePrecision, TypeConfiguration typeConfiguration) Sets the parameter binding value using the explicit TemporalType in regards to the individual values.voidsetBindValues(Collection<? extends T> values, BindableType<T> clarifiedType) Sets the parameter binding values using the explicit Type in regards to the individual values.booleansetType(MappingModelExpressible<T> type) Sets the mapping model expressible for this parameter.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.query.spi.QueryParameterBinding
setBindValue
-
Constructor Details
-
QueryParameterBindingImpl
protected QueryParameterBindingImpl(QueryParameter<T> queryParameter, SessionFactoryImplementor sessionFactory) Used byProcedureCall -
QueryParameterBindingImpl
public QueryParameterBindingImpl(QueryParameter<T> queryParameter, SessionFactoryImplementor sessionFactory, BindableType<T> bindType) Used by Query (SQM) and NativeQuery
-
-
Method Details
-
getBindType
Description copied from interface:QueryParameterBindingGet the Type currently associated with this binding.- Specified by:
getBindTypein interfaceQueryParameterBinding<T>- Returns:
- The currently associated Type
-
getExplicitTemporalPrecision
Description copied from interface:QueryParameterBindingIf the parameter represents a temporal type, return the explicitly specified precision - if one.- Specified by:
getExplicitTemporalPrecisionin interfaceQueryParameterBinding<T>
-
isBound
public boolean isBound()Description copied from interface:QueryParameterBindingIs any value (includingnull) bound? Asked another way, were any of the `#set` methods called?- Specified by:
isBoundin interfaceQueryParameterBinding<T>
-
isMultiValued
public boolean isMultiValued()Description copied from interface:QueryParameterBindingIs the binding multivalued?- Specified by:
isMultiValuedin interfaceQueryParameterBinding<T>
-
getQueryParameter
- Specified by:
getQueryParameterin interfaceQueryParameterBinding<T>
-
getBindValue
Description copied from interface:QueryParameterBindingGet the value current bound.- Specified by:
getBindValuein interfaceQueryParameterBinding<T>- Returns:
- The currently bound value
-
setBindValue
Description copied from interface:QueryParameterBindingSets the parameter binding value. The inherent parameter type (if known) is assumed. The flag controls whether the parameter type should be resolved if necessary.- Specified by:
setBindValuein interfaceQueryParameterBinding<T>
-
setBindValue
Description copied from interface:QueryParameterBindingSets the parameter binding value using the explicit Type.- Specified by:
setBindValuein interfaceQueryParameterBinding<T>- Parameters:
value- The bind valueclarifiedType- The explicit Type to use
-
setBindValue
Description copied from interface:QueryParameterBindingSets the parameter binding value using the explicit TemporalType.- Specified by:
setBindValuein interfaceQueryParameterBinding<T>- Parameters:
value- The bind valuetemporalTypePrecision- The temporal type to use
-
getBindValues
Description copied from interface:QueryParameterBindingGet the values currently bound.- Specified by:
getBindValuesin interfaceQueryParameterBinding<T>- Returns:
- The currently bound values
-
setBindValues
Description copied from interface:QueryParameterBindingSets the parameter binding values. The inherent parameter type (if known) is assumed in regards to the individual values.- Specified by:
setBindValuesin interfaceQueryParameterBinding<T>- Parameters:
values- The bind values
-
setBindValues
Description copied from interface:QueryParameterBindingSets the parameter binding values using the explicit Type in regards to the individual values.- Specified by:
setBindValuesin interfaceQueryParameterBinding<T>- Parameters:
values- The bind valuesclarifiedType- The explicit Type to use
-
setBindValues
public void setBindValues(Collection<? extends T> values, TemporalType temporalTypePrecision, TypeConfiguration typeConfiguration) Description copied from interface:QueryParameterBindingSets the parameter binding value using the explicit TemporalType in regards to the individual values.- Specified by:
setBindValuesin interfaceQueryParameterBinding<T>- Parameters:
values- The bind valuestemporalTypePrecision- The temporal type to use
-
getType
Description copied from interface:QueryParameterBindingReturns the inferred mapping model expressible i.e. the model reference against which this parameter is compared.- Specified by:
getTypein interfaceQueryParameterBinding<T>- Returns:
- the inferred mapping model expressible or
null
-
setType
Description copied from interface:QueryParameterBindingSets the mapping model expressible for this parameter.- Specified by:
setTypein interfaceQueryParameterBinding<T>- Parameters:
type- The mapping model expressible- Returns:
- Whether the bind type was changed
-
getTypeConfiguration
- Specified by:
getTypeConfigurationin interfaceJavaType.CoercionContext
-