Interface QueryParameterBindings

All Known Implementing Classes:
ProcedureParamBindings, QueryParameterBindingsImpl

@Incubating public interface QueryParameterBindings
Manages all the parameter bindings for a particular query.
  • Field Details

  • Method Details

    • isBound

      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 - The parameter to check for a binding
      Returns:
      true if its value has been bound; false otherwise.
    • getBinding

      default <P> QueryParameterBinding<P> getBinding(QueryParameter<P> parameter)
      Access to the binding via QueryParameter reference
      Parameters:
      parameter - The QueryParameter reference
      Returns:
      The binding, or null if not yet bound
    • getBinding

      <P> QueryParameterBinding<P> getBinding(QueryParameterImplementor<P> parameter)
      Access to the binding via QueryParameter reference
      Parameters:
      parameter - The QueryParameter reference
      Returns:
      The binding, or null if not yet bound
    • getBinding

      <P> QueryParameterBinding<P> getBinding(String name)
      Access to the binding via name
      Parameters:
      name - The parameter name
      Returns:
      The binding, or null if not yet bound
    • getBinding

      <P> QueryParameterBinding<P> getBinding(int position)
      Access to the binding via position
      Parameters:
      position - The parameter position
      Returns:
      The binding, or null if not yet bound
    • validate

      void validate()
      Validate the bindings. Called just before execution
    • hasAnyMultiValuedBindings

      boolean hasAnyMultiValuedBindings()
    • generateQueryKeyMemento

      QueryKey.ParameterBindingsMemento generateQueryKeyMemento(SharedSessionContractImplementor persistenceContext)
      Generate a "memento" for these parameter bindings that can be used in creating a QueryKey
    • visitBindings

      void visitBindings(BiConsumer<QueryParameterImplementor<?>,QueryParameterBinding<?>> action)
    • empty

      static QueryParameterBindings empty()