Top Fields Constructors Methods
org.hibernate.engine.query.spi

public abstract Class AbstractParameterDescriptor<T>

extends Object
implements QueryParameter<T>
Class Inheritance
All Implemented Interfaces
org.hibernate.query.QueryParameter, jakarta.persistence.Parameter
Known Direct Subclasses
org.hibernate.engine.query.spi.NamedParameterDescriptor, org.hibernate.engine.query.spi.OrdinalParameterDescriptor
Annotations
@Incubating
Imports
org.hibernate.Incubating, org.hibernate.query.BindableType, .QueryParameter, org.hibernate.metamodel.model.domain.EmbeddableDomainType, org.hibernate.metamodel.model.domain.internal.EntityTypeImpl

API Note

Consider this contract (and its subcontracts) as incubating as we transition to 6.0 and SQM.

Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private BindableType<T>
private final int[]

Constructor Summary

AccessConstructor and Description
public
AbstractParameterDescriptor(int[] sourceLocations, BindableType<T> expectedType)

Method Summary

Modifier and TypeMethod and Description
public boolean
allowsMultiValuedBinding()

Implements org.hibernate.query.QueryParameter.allowsMultiValuedBinding.

Does this parameter allow multi-valued (collection, array, etc) binding?
public BindableType<T>
public BindableType<T>
getHibernateType()

Implements org.hibernate.query.QueryParameter.getHibernateType.

Get the Hibernate Type associated with this parameter, if one.
public String
getName()

Implements jakarta.persistence.Parameter.getName.

Return the parameter name, or null if the parameter is not a named parameter or no name has been assigned.
public Class<T>
getParameterType()

Implements jakarta.persistence.Parameter.getParameterType.

Return the Java type of the parameter.
public Integer
getPosition()

Implements jakarta.persistence.Parameter.getPosition.

Return the parameter position, or null if the parameter is not a positional parameter.
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

expectedTypeback to summary
private BindableType<T> expectedType
sourceLocationsback to summary
private final int[] sourceLocations

Constructor Detail

AbstractParameterDescriptorback to summary
public AbstractParameterDescriptor(int[] sourceLocations, BindableType<T> expectedType)

Method Detail

allowsMultiValuedBindingback to summary
public boolean allowsMultiValuedBinding()

Implements org.hibernate.query.QueryParameter.allowsMultiValuedBinding.

Doc from org.hibernate.query.QueryParameter.allowsMultiValuedBinding.

Does this parameter allow multi-valued (collection, array, etc) binding?

This is only valid for HQL/JPQL and (I think) Criteria queries, and is determined based on the context of the parameters declaration.

Returns:boolean

true indicates that multi-valued binding is allowed for this parameter

Annotations
@Override
getExpectedTypeback to summary
public BindableType<T> getExpectedType()
getHibernateTypeback to summary
public BindableType<T> getHibernateType()

Implements org.hibernate.query.QueryParameter.getHibernateType.

Doc from org.hibernate.query.QueryParameter.getHibernateType.

Get the Hibernate Type associated with this parameter, if one. May return null.

Returns:BindableType<T>

The associated Hibernate Type, may be null.

Annotations
@Override
getNameback to summary
public String getName()

Implements jakarta.persistence.Parameter.getName.

Doc from jakarta.persistence.Parameter.getName.

Return the parameter name, or null if the parameter is not a named parameter or no name has been assigned.

Returns:String

parameter name

Annotations
@Override
getParameterTypeback to summary
public Class<T> getParameterType()

Implements jakarta.persistence.Parameter.getParameterType.

Doc from jakarta.persistence.Parameter.getParameterType.

Return the Java type of the parameter. Values bound to the parameter must be assignable to this type. This method is required to be supported for criteria queries only. Applications that use this method for Jakarta Persistence query language queries and native queries will not be portable.

Returns:Class<T>

the Java type of the parameter

Annotations
@Override
getPositionback to summary
public Integer getPosition()

Implements jakarta.persistence.Parameter.getPosition.

Doc from jakarta.persistence.Parameter.getPosition.

Return the parameter position, or null if the parameter is not a positional parameter.

Returns:Integer

position of parameter

Annotations
@Override
resetExpectedTypeback to summary
public void resetExpectedType(BindableType<T> expectedType)