Package org.hibernate.query.internal
Class QueryParameterBindingsImpl
java.lang.Object
org.hibernate.query.internal.QueryParameterBindingsImpl
- All Implemented Interfaces:
QueryParameterBindings
@Incubating
public class QueryParameterBindingsImpl
extends Object
implements QueryParameterBindings
Manages the group of QueryParameterBinding for a particular query.
- Author:
- Steve Ebersole, Chris Cranford
-
Field Summary
FieldsFields inherited from interface org.hibernate.query.spi.QueryParameterBindings
NO_PARAM_BINDINGS, NO_PARAMETER_BINDING_MEMENTO -
Method Summary
Modifier and TypeMethodDescriptioncopyWithoutValues(SessionFactoryImplementor sessionFactory) static QueryParameterBindingsImplfrom(ParameterMetadataImplementor parameterMetadata, SessionFactoryImplementor sessionFactory) Constructs a QueryParameterBindings based on the passed informationGenerate a "memento" for these parameter bindings that can be used in creating aQueryKey<P> QueryParameterBinding<P>getBinding(int position) Access to the binding via position<P> QueryParameterBinding<P>getBinding(String name) Access to the binding via name<P> QueryParameterBinding<P>getBinding(QueryParameterImplementor<P> parameter) Access to the binding via QueryParameter referencebooleanbooleanisBound(QueryParameterImplementor<?> parameter) Has binding been done for the given parameter.voidvalidate()Validate the bindings.voidvisitBindings(BiConsumer action) 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.QueryParameterBindings
getBinding
-
Field Details
-
EMPTY
-
-
Method Details
-
from
public static QueryParameterBindingsImpl from(ParameterMetadataImplementor parameterMetadata, SessionFactoryImplementor sessionFactory) Constructs a QueryParameterBindings based on the passed information -
copyWithoutValues
-
isBound
Description copied from interface:QueryParameterBindingsHas binding been done for the given parameter. Handles cases where we do not (yet) have a binding object as well by simply returning false.- Specified by:
isBoundin interfaceQueryParameterBindings- Parameters:
parameter- The parameter to check for a binding- Returns:
trueif its value has been bound;falseotherwise.
-
getBinding
Description copied from interface:QueryParameterBindingsAccess to the binding via QueryParameter reference- Specified by:
getBindingin interfaceQueryParameterBindings- Parameters:
parameter- The QueryParameter reference- Returns:
- The binding, or
nullif not yet bound
-
getBinding
Description copied from interface:QueryParameterBindingsAccess to the binding via position- Specified by:
getBindingin interfaceQueryParameterBindings- Parameters:
position- The parameter position- Returns:
- The binding, or
nullif not yet bound
-
getBinding
Description copied from interface:QueryParameterBindingsAccess to the binding via name- Specified by:
getBindingin interfaceQueryParameterBindings- Parameters:
name- The parameter name- Returns:
- The binding, or
nullif not yet bound
-
validate
public void validate()Description copied from interface:QueryParameterBindingsValidate the bindings. Called just before execution- Specified by:
validatein interfaceQueryParameterBindings
-
hasAnyMultiValuedBindings
public boolean hasAnyMultiValuedBindings()- Specified by:
hasAnyMultiValuedBindingsin interfaceQueryParameterBindings
-
visitBindings
- Specified by:
visitBindingsin interfaceQueryParameterBindings
-