Package org.hibernate.query
Interface ParameterMetadata
- All Known Subinterfaces:
ParameterMetadataImplementor
,ProcedureParameterMetadataImplementor
- All Known Implementing Classes:
ParameterMetadataImpl
,ProcedureParameterMetadataImpl
Access to known information about the parameters for a query.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsReference
(QueryParameter<?> parameter) Is this parameter reference registered in this collection?findQueryParameter
(int positionLabel) Find the QueryParameter registered under the given position-label, if one.findQueryParameter
(String name) Find the QueryParameter registered under the given name, if one.default <T> BindableType<T>
getInferredParameterType
(QueryParameter<T> parameter) Return the names of all named parameters of the query.int
The total number of registered parameters.getQueryParameter
(int positionLabel) Get the QueryParameter reference registered here under the given position-label.getQueryParameter
(String name) Get the QueryParameter reference registered here 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>
A deeper resolution attempt from a JPA parameter reference to Hibernate's contract.void
visitRegistrations
(Consumer<? extends QueryParameter<?>> action) General purpose visitation using functional
-
Method Details
-
getParameterCount
int getParameterCount()The total number of registered parameters. -
findQueryParameter
Find the QueryParameter registered under the given name, if one.- Returns:
- The registered match, or
null
is there is no match - See Also:
-
getQueryParameter
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
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
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
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
-
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
-