Top Description Methods
org.hibernate.query

public Interface ParameterMetadata

Known Direct Subinterfaces
org.hibernate.query.spi.ParameterMetadataImplementor
Annotations
@Incubating
Imports
java.util.Set, java.util.function.Consumer, jakarta.persistence.Parameter, org.hibernate.Incubating

Access to known information about the parameters for a query.
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public boolean
containsReference(QueryParameter<?> parameter)

Is this parameter reference registered in this collection?

public QueryParameter<?>

Returns:

The registered match, or null is there is no match
findQueryParameter
(String name)

Find the QueryParameter registered under the given name, if one.

public QueryParameter<?>

Returns:

The registered match, or null is there is no match
findQueryParameter
(int positionLabel)

Find the QueryParameter registered under the given position-label, if one.

public default <T> BindableType<T>
public Set<String>

Returns:

the parameter names
getNamedParameterNames
()

Return the names of all named parameters of the query.

public Set<Integer>
public int
getParameterCount()

The total number of registered parameters.

public QueryParameter<?>

Returns:

The registered match. Never null
getQueryParameter
(String name)

Get the QueryParameter reference registered here under the given name.

public QueryParameter<?>

Returns:

The registered match. Never null
getQueryParameter
(int positionLabel)

Get the QueryParameter reference registered here under the given position-label.

public Set<? extends QueryParameter<?>>
public boolean

Returns:

true if there are named parameters; false otherwise.
hasNamedParameters
()

Does this parameter set contain any named parameters?

public boolean

Returns:

true if there are positional parameters; false otherwise.
hasPositionalParameters
()

Does this parameter set contain any positional parameters?

public <P> QueryParameter<P>
resolve(Parameter<P> param)

A deeper resolution attempt from a JPA parameter reference to Hibernate's contract.

public void
visitRegistrations(Consumer<? extends QueryParameter<?>> action)

General purpose visitation using functional

Method Detail

containsReferenceback to summary
public boolean containsReference(QueryParameter<?> parameter)

Is this parameter reference registered in this collection?

findQueryParameterback to summary
public QueryParameter<?> findQueryParameter(String name)

Find the QueryParameter registered under the given name, if one.

Returns:QueryParameter<?>

The registered match, or null is there is no match

See Also
getQueryParameter(String)
findQueryParameterback to summary
public QueryParameter<?> findQueryParameter(int positionLabel)

Find the QueryParameter registered under the given position-label, if one.

Returns:QueryParameter<?>

The registered match, or null is there is no match

See Also
getQueryParameter(int)
getInferredParameterTypeback to summary
public default <T> BindableType<T> getInferredParameterType(QueryParameter<T> parameter)
getNamedParameterNamesback to summary
public Set<String> getNamedParameterNames()

Return the names of all named parameters of the query.

Returns:Set<String>

the parameter names

getOrdinalParameterLabelsback to summary
public Set<Integer> getOrdinalParameterLabels()
getParameterCountback to summary
public int getParameterCount()

The total number of registered parameters.

getQueryParameterback to summary
public QueryParameter<?> getQueryParameter(String name)

Get the QueryParameter reference registered here under the given name.

Returns:QueryParameter<?>

The registered match. Never null

Exceptions
IllegalArgumentException:
if no parameter is registered under that name
getQueryParameterback to summary
public QueryParameter<?> getQueryParameter(int positionLabel)

Get the QueryParameter reference registered here under the given position-label.

Returns:QueryParameter<?>

The registered match. Never null

Exceptions
IllegalArgumentException:
if no parameter is registered under that position-label
getRegistrationsback to summary
public Set<? extends QueryParameter<?>> getRegistrations()
hasNamedParametersback to summary
public boolean hasNamedParameters()

Does this parameter set contain any named parameters?

Returns:boolean

true if there are named parameters; false otherwise.

hasPositionalParametersback to summary
public boolean hasPositionalParameters()

Does this parameter set contain any positional parameters?

Returns:boolean

true if there are positional parameters; false otherwise.

resolveback to summary
public <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.

visitRegistrationsback to summary
public void visitRegistrations(Consumer<? extends QueryParameter<?>> action)

General purpose visitation using functional