Creates a {@code QueryParameterValue} object with the given value and type.
433341
public static <T> QueryParameterValue of(T value, StandardSQLTypeName type) {
    return QueryParameterValue.newBuilder()
        .setValue(valueToStringOrNull(value, type))
        .setType(type)
        .build();
  }
154487
public static <T extends Query<?, R>, R extends Object> FluentAnswer<T, R> createAnswer(Class<T> type) {
    return new FluentAnswer<T, R>(type);
  }
242162
public static Object valueOf(Class<?> type, String value) {
		try {
			if (type.equals(java.lang.String.class)) {
				return value;
			}

			Method m = class2Value.get(type);
			if (m != null) {
				return m.invoke(null, value);
			}

			if (type.equals(java.lang.Character.TYPE)
					|| type.equals(java.lang.Character.class)) {
				return new Character(value.charAt(0));
			}

			Constructor<?> c = type.getConstructor(java.lang.String.class);
			return c.newInstance(value);
		} catch (NoSuchMethodException | InstantiationException | IllegalAccessException e) {
			// LogSupport.ignore(log,e);
		} catch (InvocationTargetException e) {
			if (e.getTargetException() instanceof Error) {
				throw (Error) (e.getTargetException());
			}
		}
		return null;
	}
1089570
public URIBuilder queryParam(String name, String value) {
		parameters.add(name, value);
		return this;
	}
548281
@Override
	public SqlContext param(final String parameterName, final Object value, final int sqlType) {
		if (value instanceof Optional) {
			Optional<?> optionalValue = (Optional<?>) value;
			if (optionalValue.isPresent()) {
				param(new Parameter(parameterName, optionalValue.get(), sqlType));
			} else {
				param(new Parameter(parameterName, null));
			}
			return this;
		} else {
			return param(new Parameter(parameterName, value, sqlType));
		}
	}
249627
public HttpRequest addQueryParameter(String name, String value) {
    queryParameters.put(
        Objects.requireNonNull(name, "Name must be set"),
        Objects.requireNonNull(value, "Value must be set"));
    return this;
  }
643885
@VisibleForTesting
    FieldValue createFieldValue(SearchQueryField field, String quotedStringValue, boolean negate) {
        // Make sure there are no quotes in the value (e.g. `"foo"' --> `foo')
        final String value = quotedStringValue.replaceAll(QUOTE_REPLACE_REGEX, "");
        final SearchQueryField.Type fieldType = field.getFieldType();
        final Pair<String, SearchQueryOperator> pair = extractOperator(value, fieldType == STRING ? DEFAULT_STRING_OPERATOR : DEFAULT_OPERATOR);

        switch (fieldType) {
            case DATE:
                return new FieldValue(parseDate(pair.getLeft()), pair.getRight(), negate);
            case STRING:
                return new FieldValue(pair.getLeft(), pair.getRight(), negate);
            case INT:
                return new FieldValue(Integer.parseInt(pair.getLeft()), pair.getRight(), negate);
            case LONG:
                return new FieldValue(Long.parseLong(pair.getLeft()), pair.getRight(), negate);
            default:
                throw new IllegalArgumentException("Unhandled field type: " + fieldType.toString());
        }
    }
1004631
public function bindValue($parameter = null, $value = null, $type = null)
    {
        parent::bindValue($parameter, $value, $type);
        
        return $this;
    }
958208
public <T extends Enum<T>> String serializeToQueryParams(T value) {
        return (String) objectMapper.convertValue(value, String.class);
    }
23225
@Override
    public <T> Query<T> createQuery(Class<T> entityType, Object queryObject) {
        Assert.notNull(entityType, "entityType must not null");
        Assert.notNull(queryObject, "queryObject must not null");
        return query(entityType, queryObject);
    }
996404
public StatementBuilder withBindVariableValue(String key, Value value) {
    queryBuilder.withBindVariableValue(key, value);
    return this;
  }
816218
public QueryRequest addParameter(String key, Object value) {
        if (parameters.get(key) == null) {
            parameters.put(key, Sets.newHashSet(value));
        } else {
            parameters.get(key).add(value);
        }
        return this;
    }
1020766
public static <T> T convert(Type type, Object value, T defaultValue) throws ConvertException {
		return ConverterRegistry.getInstance().convert(type, value, defaultValue);
	}
577526
public UriComponentsBuilder queryParams(MultiValueMap<String, String> params) {
		Assert.notNull(params, "'params' must not be null");
		this.queryParams.putAll(params);
		return this;
	}
500290
private <T extends ValueDescriptor<?>> T createValue(Class<T> type, String name) {
        if (name != null) {
            this.arrayValueDescriptor = null;
        }
        String valueName;
        if (arrayValueDescriptor != null) {
            valueName = "[" + getArrayValue().size() + "]";
        } else {
            valueName = name;
        }
        T valueDescriptor = visitorHelper.getValueDescriptor(type);
        valueDescriptor.setName(valueName);
        return valueDescriptor;
    }
429880
public <T> T queryForObject(String sql, Class<T> requiredType) throws SQLException {
		return queryForObject(sql, getSingleColumnRowMapper(requiredType));
	}
298903
private QueryBuilder genericRequest(String type, String value) throws Exception {
        JSONObject op = new JSONObject();
        op.put(type, value);
        JSONArray operations = (JSONArray) request.get(Constants.REQUEST_OPERATIONS);
        operations.put(op);
        request.remove(Constants.REQUEST_OPERATIONS);
        request.put(Constants.REQUEST_OPERATIONS, operations);
        return this;
    }