Package org.hibernate.query
Interface ParameterMetadata
- All Known Subinterfaces:
ParameterMetadataImplementor,ProcedureParameterMetadataImplementor
- All Known Implementing Classes:
ParameterMetadataImpl,ProcedureParameterMetadataImpl
Information about the parameters
of a query.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsReference(QueryParameter<?> parameter) Is this parameter reference registered in this collection?findQueryParameter(int positionLabel) Find the parameter reference registered at the given position-label, if there is one.findQueryParameter(String name) Find the parameter reference registered under the given name, if there is one.<T> BindableType<T> getInferredParameterType(QueryParameter<T> parameter) Get the type of the given parameter.Return the names of all named parameters of the query.Get the position labels of all positional parameters.intThe total number of registered parameters.TheQueryParameters representing the parameters of the query, in no particular well-defined order.getQueryParameter(int positionLabel) Get the parameter reference registered at the given position-label.getQueryParameter(String name) Get the parameter reference registered under the given name.Set<? extends QueryParameter<?>> booleanDoes this parameter set contain any named parameters?booleanDoes this parameter set contain any positional parameters?<P> QueryParameter<P> Obtain aQueryParameterrepresenting the same parameter as the given JPA-standardParameter.voidvisitRegistrations(Consumer<QueryParameter<?>> action) General purpose visitation using functional
-
Method Details
-
getParameters
Collection<QueryParameter<?>> getParameters()TheQueryParameters representing the parameters of the query, in no particular well-defined order.- Since:
- 7.0
-
getParameterCount
int getParameterCount()The total number of registered parameters. -
findQueryParameter
Find the parameter reference registered under the given name, if there is one.- Returns:
- The registered match, or
nullis there is no match - See Also:
-
getQueryParameter
Get the parameter reference registered under the given name.- Returns:
- The registered match. Never
null - Throws:
IllegalArgumentException- if no parameter is registered under that name
-
findQueryParameter
Find the parameter reference registered at the given position-label, if there is one.- Returns:
- The registered match, or
nullis there is no match - See Also:
-
getQueryParameter
Get the parameter reference registered at the given position-label.- Returns:
- The registered match. Never
null - Throws:
IllegalArgumentException- if no parameter is registered under that position-label
-
resolve
Obtain aQueryParameterrepresenting the same parameter as the given JPA-standardParameter.- API Note:
- According to the spec, only
Parameterreferences obtained from the provider are valid.
-
getInferredParameterType
Get the type of the given parameter. -
containsReference
Is this parameter reference registered in this collection? -
getRegistrations
Set<? extends QueryParameter<?>> getRegistrations() -
visitRegistrations
General purpose visitation using functional -
hasNamedParameters
boolean hasNamedParameters()Does this parameter set contain any named parameters?- Returns:
trueif there are named parameters;falseotherwise.
-
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:
trueif there are positional parameters;falseotherwise.
-
getOrdinalParameterLabels
Get the position labels of all positional parameters.- Returns:
- the position labels
-