Class AbstractQueryParameter<T>

java.lang.Object
org.hibernate.query.spi.AbstractQueryParameter<T>
All Implemented Interfaces:
Parameter<T>, QueryParameter<T>, QueryParameterImplementor<T>
Direct Known Subclasses:
ProcedureParameterImpl, QueryParameterNamedImpl, QueryParameterPositionalImpl

public abstract class AbstractQueryParameter<T> extends Object implements QueryParameterImplementor<T>
Author:
Steve Ebersole
  • Constructor Details

    • AbstractQueryParameter

      public AbstractQueryParameter(boolean allowMultiValuedBinding, BindableType<T> anticipatedType)
  • Method Details

    • disallowMultiValuedBinding

      public void disallowMultiValuedBinding()
      Specified by:
      disallowMultiValuedBinding in interface QueryParameterImplementor<T>
    • allowsMultiValuedBinding

      public boolean allowsMultiValuedBinding()
      Description copied from interface: QueryParameter
      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.

      Specified by:
      allowsMultiValuedBinding in interface QueryParameter<T>
      Returns:
      true indicates that multi-valued binding is allowed for this parameter
    • getHibernateType

      public BindableType<T> getHibernateType()
      Description copied from interface: QueryParameter
      Get the Hibernate Type associated with this parameter, if one. May return null.
      Specified by:
      getHibernateType in interface QueryParameter<T>
      Returns:
      The associated Hibernate Type, may be null.
    • applyAnticipatedType

      public void applyAnticipatedType(BindableType type)
      Specified by:
      applyAnticipatedType in interface QueryParameterImplementor<T>
    • getName

      public String getName()
      Description copied from interface: Parameter
      Return the parameter name, or null if the parameter is not a named parameter or no name has been assigned.
      Specified by:
      getName in interface Parameter<T>
      Returns:
      parameter name
    • getPosition

      public Integer getPosition()
      Description copied from interface: Parameter
      Return the parameter position, or null if the parameter is not a positional parameter.
      Specified by:
      getPosition in interface Parameter<T>
      Returns:
      position of parameter
    • getParameterType

      public Class<T> getParameterType()
      Description copied from interface: Parameter
      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.
      Specified by:
      getParameterType in interface Parameter<T>
      Returns:
      the Java type of the parameter