Package org.hibernate.query
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
Represents a parameter defined in the source (HQL/JPQL or criteria) query.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanDoes this parameter allow multi-valued (collection, array, etc) binding?Get the Hibernate Type associated with this parameter, if one.default booleanisNamed()Determine if this a named parameter or ordinal.default booleanDetermine 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:
trueif it is a named parameter;falseif it is ordinal- Since:
- 7.0
-
isOrdinal
default boolean isOrdinal()Determine if this a named parameter or ordinal.- Returns:
trueif it is an ordinal parameter;falseif 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:
trueindicates that multi-valued binding is allowed for this parameter
-
getHibernateType
BindableType<T> getHibernateType()Get the Hibernate Type associated with this parameter, if one. May returnnull.- Returns:
- The associated Hibernate Type, may be
null.
-