Interface ParameterMetadata

All Known Subinterfaces:
ParameterMetadataImplementor, ProcedureParameterMetadataImplementor
All Known Implementing Classes:
ParameterMetadataImpl, ProcedureParameterMetadataImpl

@Incubating public interface ParameterMetadata
Access to known information about the parameters for a query.
  • Method Details

    • getParameterCount

      int getParameterCount()
      The total number of registered parameters.
    • findQueryParameter

      QueryParameter<?> findQueryParameter(String name)
      Find the QueryParameter registered under the given name, if one.
      Returns:
      The registered match, or null is there is no match
      See Also:
    • getQueryParameter

      QueryParameter<?> getQueryParameter(String name)
      Get the QueryParameter reference registered here under the given name.
      Returns:
      The registered match. Never null
      Throws:
      IllegalArgumentException - if no parameter is registered under that name
    • findQueryParameter

      QueryParameter<?> findQueryParameter(int positionLabel)
      Find the QueryParameter registered under the given position-label, if one.
      Returns:
      The registered match, or null is there is no match
      See Also:
    • getQueryParameter

      QueryParameter<?> getQueryParameter(int positionLabel)
      Get the QueryParameter reference registered here under the given position-label.
      Returns:
      The registered match. Never null
      Throws:
      IllegalArgumentException - if no parameter is registered under that position-label
    • resolve

      <P> QueryParameter<P> resolve(Parameter<P> param)
      A deeper resolution attempt from a JPA parameter reference to Hibernate's contract. Generally should return the same param reference. According to the spec, only Parameter references obtained from the provider are valid.
    • getInferredParameterType

      default <T> BindableType<T> getInferredParameterType(QueryParameter<T> parameter)
    • containsReference

      boolean containsReference(QueryParameter<?> parameter)
      Is this parameter reference registered in this collection?
    • getRegistrations

      Set<? extends QueryParameter<?>> getRegistrations()
    • visitRegistrations

      void visitRegistrations(Consumer<? extends QueryParameter<?>> action)
      General purpose visitation using functional
    • hasNamedParameters

      boolean hasNamedParameters()
      Does this parameter set contain any named parameters?
      Returns:
      true if there are named parameters; false otherwise.
    • getNamedParameterNames

      Set<String> getNamedParameterNames()
      Return the names of all named parameters of the query.
      Returns:
      the parameter names
    • hasPositionalParameters

      boolean hasPositionalParameters()
      Does this parameter set contain any positional parameters?
      Returns:
      true if there are positional parameters; false otherwise.
    • getOrdinalParameterLabels

      Set<Integer> getOrdinalParameterLabels()