接口 ParameterRegistration<T>

  • 所有超级接口:
    javax.persistence.Parameter<T>
    所有已知子接口:
    NullTypeBindableParameterRegistration<T>, StoredProcedureQueryParameterRegistration<T>

    public interface ParameterRegistration<T>
    extends javax.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 ParameterExpressionImpl instead.

    作者:
    Steve Ebersole
    • 方法概要

      所有方法 实例方法 抽象方法 
      修饰符和类型 方法 说明
      void bindValue​(T value)
      If bindable, bind the value.
      void bindValue​(T value, javax.persistence.TemporalType specifiedTemporalType)
      If bindable, bind the value using the specific temporal type.
      ParameterBind<T> getBind()
      If bindable, get the current binding.
      javax.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?
      javax.persistence.Query getQuery()
      Access to the query that this parameter belongs to.
      boolean isBindable()
      Can we bind (set) values on this parameter?
      boolean isJpaPositionalParameter()
      JPA has a different definition of positional parameters than what legacy Hibernate HQL had.
      • 从接口继承的方法 javax.persistence.Parameter

        getName, getParameterType, getPosition
    • 方法详细资料

      • 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).
        返回:
        true if this is a JPA-style positional 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

        javax.persistence.Query getQuery()
        Access to the query that this parameter belongs to.
        返回:
        The defining query
      • getMode

        javax.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).
        返回:
        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.
        返回:
        Whether the parameter is bindable (can set be called).
      • bindValue

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

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

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