Interface QueryParameter<T>

All Superinterfaces:
Parameter<T>
All Known Subinterfaces:
FunctionReturn<T>, FunctionReturnImplementor<T>, ProcedureParameter<T>, ProcedureParameterImplementor<T>, QueryParameterImplementor<T>
All Known Implementing Classes:
AbstractParameterDescriptor, AbstractQueryParameter, FunctionReturnImpl, JpaCriteriaParameter, NamedParameterDescriptor, OrdinalParameterDescriptor, ProcedureParameterImpl, QueryParameterNamedImpl, QueryParameterPositionalImpl, ValueBindJpaCriteriaParameter

@Incubating public interface QueryParameter<T> extends Parameter<T>
Represents a parameter defined in the source (HQL/JPQL or criteria) query.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Does this parameter allow multi-valued (collection, array, etc) binding?
    Get the Hibernate Type associated with this parameter, if one.
    default boolean
    Determine if this a named parameter or ordinal.
    default boolean
    Determine if this a named parameter or ordinal.

    Methods inherited from interface jakarta.persistence.Parameter

    getName, getParameterType, getPosition
  • Method Details

    • isNamed

      default boolean isNamed()
      Determine if this a named parameter or ordinal.
      Returns:
      true if it is a named parameter; false if it is ordinal
      Since:
      7.0
    • isOrdinal

      default boolean isOrdinal()
      Determine if this a named parameter or ordinal.
      Returns:
      true if it is an ordinal parameter; false if it is named
      Since:
      7.0
    • allowsMultiValuedBinding

      boolean 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:
      true indicates that multi-valued binding is allowed for this parameter
    • getHibernateType

      BindableType<T> getHibernateType()
      Get the Hibernate Type associated with this parameter, if one. May return null.
      Returns:
      The associated Hibernate Type, may be null.