Interface ParameterRegistration<T>

  • All Superinterfaces:
    jakarta.persistence.Parameter<T>
    All Known Subinterfaces:
    NullTypeBindableParameterRegistration<T>, StoredProcedureQueryParameterRegistration<T>

    public interface ParameterRegistration<T>
    extends jakarta.persistence.Parameter<T>
    Hibernate specific extension to the JPA Parameter contract as known to the Query and StoredProcedureQuery implementations. Used to track information known about the parameter.

    For parameter information as known to JPA criteria queries, see JpaCriteriaParameter instead.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void bindValue​(T value)
      If bindable, bind the value.
      void bindValue​(T value, jakarta.persistence.TemporalType specifiedTemporalType)
      If bindable, bind the value using the specific temporal type.
      ParameterBind<T> getBind()
      If bindable, get the current binding.
      jakarta.persistence.ParameterMode getMode()
      Retrieves the parameter "mode" which describes how the parameter is defined in the actual database procedure definition (is it an INPUT parameter? An OUTPUT parameter? etc).
      jakarta.persistence.Query getQuery()
      Access to the query that this parameter belongs to.
      boolean isBindable()
      Can we bind (set) values on this parameter? Generally this is true, but would not be in the case of parameters with OUT or REF_CURSOR mode.
      boolean isJpaPositionalParameter()
      JPA has a different definition of positional parameters than what legacy Hibernate HQL had.
      • Methods inherited from interface jakarta.persistence.Parameter

        getName, getParameterType, getPosition
    • Method Detail

      • isJpaPositionalParameter

        boolean isJpaPositionalParameter()
        JPA has a different definition of positional parameters than what legacy Hibernate HQL had. In JPA, the parameter holders are labelled (named :/). At any rate the semantics are different and we often need to understand which we are dealing with (and applications might too).
        Returns:
        true if this is a JPA-style ordinal parameter; false would indicate we have either a named parameter (Parameter.getName() would return a non-null value) or a native Hibernate positional parameter.
      • getQuery

        jakarta.persistence.Query getQuery()
        Access to the query that this parameter belongs to.
        Returns:
        The defining query
      • getMode

        jakarta.persistence.ParameterMode getMode()
        Retrieves the parameter "mode" which describes how the parameter is defined in the actual database procedure definition (is it an INPUT parameter? An OUTPUT parameter? etc).
        Returns:
        The parameter mode.
      • isBindable

        boolean isBindable()
        Can we bind (set) values on this parameter? Generally this is true, but would not be in the case of parameters with OUT or REF_CURSOR mode.
        Returns:
        Whether the parameter is bindable (can set be called).
      • bindValue

        void bindValue​(T value)
        If bindable, bind the value.
        Parameters:
        value - The value to bind.
      • bindValue

        void bindValue​(T value,
                       jakarta.persistence.TemporalType specifiedTemporalType)
        If bindable, bind the value using the specific temporal type.
        Parameters:
        value - The value to bind
        specifiedTemporalType - The temporal type to use in binding
      • getBind

        ParameterBind<T> getBind()
        If bindable, get the current binding.
        Returns:
        The current binding