Package org.hibernate.query
Interface ParameterMetadata
- All Known Subinterfaces:
ParameterMetadataImplementor
,ProcedureParameterMetadataImplementor
- All Known Implementing Classes:
ParameterMetadataImpl
,ProcedureParameterMetadataImpl
Information about the parameters
of a query.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsReference
(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.int
The total number of registered parameters.TheQueryParameter
s 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<?>>
boolean
Does this parameter set contain any named parameters?boolean
Does this parameter set contain any positional parameters?<P> QueryParameter<P>
Obtain aQueryParameter
representing the same parameter as the given JPA-standardParameter
.void
visitRegistrations
(Consumer<QueryParameter<?>> action) General purpose visitation using functional
-
Method Details
-
getParameters
Collection<QueryParameter<?>> getParameters()TheQueryParameter
s 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
null
is 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
null
is 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 aQueryParameter
representing the same parameter as the given JPA-standardParameter
.- API Note:
- According to the spec, only
Parameter
references 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:
true
if there are named parameters;false
otherwise.
-
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
Get the position labels of all positional parameters.- Returns:
- the position labels
-