Top Description Fields Methods
org.hibernate.query.spi

public Interface QueryParameterBindings

Known Direct Implementers
org.hibernate.procedure.internal.ProcedureParamBindings, org.hibernate.query.internal.QueryParameterBindingsImpl
Annotations
@Incubating
Imports
java.util.function.BiConsumer, org.hibernate.Incubating, org.hibernate.cache.spi.QueryKey, org.hibernate.engine.spi.SharedSessionContractImplementor, org.hibernate.query.QueryParameter

Manages all the parameter bindings for a particular query.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
public static final QueryParameterBindings
public static final QueryKey.ParameterBindingsMemento

Method Summary

Modifier and TypeMethod and Description
public QueryKey.ParameterBindingsMemento
generateQueryKeyMemento(SharedSessionContractImplementor persistenceContext)

Generate a "memento" for these parameter bindings that can be used in creating a QueryKey

public default <P> QueryParameterBinding<P>

Returns:

The binding, or null if not yet bound
getBinding
(QueryParameter<P>
The QueryParameter reference
parameter
)

Access to the binding via QueryParameter reference

public <P> QueryParameterBinding<P>

Returns:

The binding, or null if not yet bound
getBinding
(QueryParameterImplementor<P>
The QueryParameter reference
parameter
)

Access to the binding via QueryParameter reference

public <P> QueryParameterBinding<P>

Returns:

The binding, or null if not yet bound
getBinding
(String
The parameter name
name
)

Access to the binding via name

public <P> QueryParameterBinding<P>

Returns:

The binding, or null if not yet bound
getBinding
(int
The parameter position
position
)

Access to the binding via position

public boolean
public boolean

Returns:

true if its value has been bound; false otherwise.
isBound
(QueryParameterImplementor<?>
The parameter to check for a binding
parameter
)

Has binding been done for the given parameter.

public void
validate()

Validate the bindings.

public void

Field Detail

NO_PARAM_BINDINGSback to summary
public static final QueryParameterBindings NO_PARAM_BINDINGS
NO_PARAMETER_BINDING_MEMENTOback to summary
public static final QueryKey.ParameterBindingsMemento NO_PARAMETER_BINDING_MEMENTO

Method Detail

generateQueryKeyMementoback to summary
public QueryKey.ParameterBindingsMemento generateQueryKeyMemento(SharedSessionContractImplementor persistenceContext)

Generate a "memento" for these parameter bindings that can be used in creating a QueryKey

getBindingback to summary
public default <P> QueryParameterBinding<P> getBinding(QueryParameter<P> parameter)

Access to the binding via QueryParameter reference

Parameters
parameter:QueryParameter<P>

The QueryParameter reference

Returns:QueryParameterBinding<P>

The binding, or null if not yet bound

getBindingback to summary
public <P> QueryParameterBinding<P> getBinding(QueryParameterImplementor<P> parameter)

Access to the binding via QueryParameter reference

Parameters
parameter:QueryParameterImplementor<P>

The QueryParameter reference

Returns:QueryParameterBinding<P>

The binding, or null if not yet bound

getBindingback to summary
public <P> QueryParameterBinding<P> getBinding(String name)

Access to the binding via name

Parameters
name:String

The parameter name

Returns:QueryParameterBinding<P>

The binding, or null if not yet bound

getBindingback to summary
public <P> QueryParameterBinding<P> getBinding(int position)

Access to the binding via position

Parameters
position:int

The parameter position

Returns:QueryParameterBinding<P>

The binding, or null if not yet bound

hasAnyMultiValuedBindingsback to summary
public boolean hasAnyMultiValuedBindings()
isBoundback to summary
public boolean isBound(QueryParameterImplementor<?> parameter)

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:QueryParameterImplementor<?>

The parameter to check for a binding

Returns:boolean

true if its value has been bound; false otherwise.

validateback to summary
public void validate()

Validate the bindings. Called just before execution

visitBindingsback to summary
public void visitBindings(BiConsumer<QueryParameterImplementor<?>, QueryParameterBinding<?>> action)