Top Description Methods
org.hibernate.query.spi

public Interface QueryParameterBinding<T>

Known Direct Subinterfaces
org.hibernate.query.procedure.ProcedureParameterBinding
Known Direct Implementers
org.hibernate.query.internal.QueryParameterBindingImpl
Annotations
@Incubating
Imports
java.util.Collection, jakarta.persistence.TemporalType, org.hibernate.Incubating, org.hibernate.metamodel.mapping.MappingModelExpressible, org.hibernate.query.BindableType, org.hibernate.type.spi.TypeConfiguration

/** The value/type binding information for a particular query parameter. Supports both single-valued and multivalued binds
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public BindableType<? super T>

Returns:

The currently associated Type
getBindType
()

Get the Type currently associated with this binding.

public T

Returns:

The currently bound value
getBindValue
()

Get the value current bound.

public Collection<? extends T>

Returns:

The currently bound values
getBindValues
()

Get the values currently bound.

public TemporalType
getExplicitTemporalPrecision()

If the parameter represents a temporal type, return the explicitly specified precision - if one.

public MappingModelExpressible<T>

Returns:

the inferred mapping model expressible or null
getType
()

Returns the inferred mapping model expressible i.e. the model reference against which this parameter is compared.

public boolean
isBound()

Is any value (including null) bound?

public boolean
isMultiValued()

Is the binding multivalued?

public default void
setBindValue(T value)

Sets the parameter binding value.

public void
setBindValue(T value, boolean resolveJdbcTypeIfNecessary)

Sets the parameter binding value.

public void
setBindValue(T
The bind value
value
,
BindableType<T>
The explicit Type to use
clarifiedType
)

Sets the parameter binding value using the explicit Type.

public void
setBindValue(T
The bind value
value
,
TemporalType
The temporal type to use
temporalTypePrecision
)

Sets the parameter binding value using the explicit TemporalType.

public void
setBindValues(Collection<? extends T>
The bind values
values
)

Sets the parameter binding values.

public void
setBindValues(Collection<? extends T>
The bind values
values
,
BindableType<T>
The explicit Type to use
clarifiedType
)

Sets the parameter binding values using the explicit Type in regards to the individual values.

public void
setBindValues(Collection<? extends T>
The bind values
values
,
TemporalType
The temporal type to use
temporalTypePrecision
,
TypeConfiguration typeConfiguration)

Sets the parameter binding value using the explicit TemporalType in regards to the individual values.

public boolean

Returns:

Whether the bind type was changed
setType
(MappingModelExpressible<T>
The mapping model expressible
type
)

Sets the mapping model expressible for this parameter.

Method Detail

getBindTypeback to summary
public BindableType<? super T> getBindType()

Get the Type currently associated with this binding.

Returns:BindableType<? super T>

The currently associated Type

getBindValueback to summary
public T getBindValue()

Get the value current bound.

Returns:T

The currently bound value

getBindValuesback to summary
public Collection<? extends T> getBindValues()

Get the values currently bound.

Returns:Collection<? extends T>

The currently bound values

getExplicitTemporalPrecisionback to summary
public TemporalType getExplicitTemporalPrecision()

If the parameter represents a temporal type, return the explicitly specified precision - if one.

getTypeback to summary
public MappingModelExpressible<T> getType()

Returns the inferred mapping model expressible i.e. the model reference against which this parameter is compared.

Returns:MappingModelExpressible<T>

the inferred mapping model expressible or null

isBoundback to summary
public boolean isBound()

Is any value (including null) bound? Asked another way, were any of the `#set` methods called?

isMultiValuedback to summary
public boolean isMultiValued()

Is the binding multivalued?

setBindValueback to summary
public default void setBindValue(T value)

Sets the parameter binding value. The inherent parameter type (if known) is assumed

setBindValueback to summary
public 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.

setBindValueback to summary
public void setBindValue(T value, BindableType<T> clarifiedType)

Sets the parameter binding value using the explicit Type.

Parameters
value:T

The bind value

clarifiedType:BindableType<T>

The explicit Type to use

setBindValueback to summary
public void setBindValue(T value, TemporalType temporalTypePrecision)

Sets the parameter binding value using the explicit TemporalType.

Parameters
value:T

The bind value

temporalTypePrecision:TemporalType

The temporal type to use

setBindValuesback to summary
public 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:Collection<? extends T>

The bind values

setBindValuesback to summary
public 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:Collection<? extends T>

The bind values

clarifiedType:BindableType<T>

The explicit Type to use

setBindValuesback to summary
public 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:Collection<? extends T>

The bind values

temporalTypePrecision:TemporalType

The temporal type to use

setTypeback to summary
public boolean setType(MappingModelExpressible<T> type)

Sets the mapping model expressible for this parameter.

Parameters
type:MappingModelExpressible<T>

The mapping model expressible

Returns:boolean

Whether the bind type was changed