Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.factual.driver;
 
 import java.util.Map;

Represents an add or update submission to a Factual row.

Author(s):
brandon
 
public class Submit {

Holds all parameters for this Submit.
	private final Parameters queryParams = new Parameters();

Constructor for submit.
	public Submit() {
	}

Constructor for a submit with values initialized as key value pairs in mapping.

Parameters:
values values this submit is initialized with
	public Submit(Map<StringObjectvalues) {
		for (String key : values.keySet())
			setValue(keyvalues.get(key));
	}
	protected String toUrlQuery() {
		return UrlUtil.toUrlQuery(toUrlParams());
	}

Set the value for a single field in this submit request. Added to a JSON hash of field names and values to be added to a Factual table.

Parameters:
field the field name
value the value for the specified field
Returns:
this Submit
	public Submit setValue(String fieldObject value) {
		return this;
	}

Set the value to null for a single field in this submit request.

Parameters:
field the field to set as empty, or null.
Returns:
this Submit
	public Submit removeValue(String field) {
		setValue(fieldnull);
		return this;
	}
	protected Map<StringObjecttoUrlParams() {
		return .toUrlParams(null);
	}
New to GrepCode? Check out our FAQ X