类 MapSqlParameterSource

    • 构造器详细资料

      • MapSqlParameterSource

        public MapSqlParameterSource​(String paramName,
                                     Object value)
        Create a new MapSqlParameterSource, with one value comprised of the supplied arguments.
        参数:
        paramName - the name of the parameter
        value - the value of the parameter
        另请参阅:
        addValue(String, Object)
      • MapSqlParameterSource

        public MapSqlParameterSource​(Map<String,​?> values)
        Create a new MapSqlParameterSource based on a Map.
        参数:
        values - a Map holding existing parameter values (can be null)
    • 方法详细资料

      • addValue

        public MapSqlParameterSource addValue​(String paramName,
                                              Object value)
        Add a parameter to this parameter source.
        参数:
        paramName - the name of the parameter
        value - the value of the parameter
        返回:
        a reference to this parameter source, so it's possible to chain several calls together
      • addValue

        public MapSqlParameterSource addValue​(String paramName,
                                              Object value,
                                              int sqlType)
        Add a parameter to this parameter source.
        参数:
        paramName - the name of the parameter
        value - the value of the parameter
        sqlType - the SQL type of the parameter
        返回:
        a reference to this parameter source, so it's possible to chain several calls together
      • addValue

        public MapSqlParameterSource addValue​(String paramName,
                                              Object value,
                                              int sqlType,
                                              String typeName)
        Add a parameter to this parameter source.
        参数:
        paramName - the name of the parameter
        value - the value of the parameter
        sqlType - the SQL type of the parameter
        typeName - the type name of the parameter
        返回:
        a reference to this parameter source, so it's possible to chain several calls together
      • addValues

        public MapSqlParameterSource addValues​(Map<String,​?> values)
        Add a Map of parameters to this parameter source.
        参数:
        values - a Map holding existing parameter values (can be null)
        返回:
        a reference to this parameter source, so it's possible to chain several calls together
      • hasValue

        public boolean hasValue​(String paramName)
        从接口复制的说明: SqlParameterSource
        Determine whether there is a value for the specified named parameter.
        参数:
        paramName - the name of the parameter
        返回:
        whether there is a value defined
      • getValue

        public Object getValue​(String paramName)
        从接口复制的说明: SqlParameterSource
        Return the parameter value for the requested named parameter.
        参数:
        paramName - the name of the parameter
        返回:
        the value of the specified parameter