Start line:  
End line:  

Snippet Preview

Snippet HTML Code

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

Represents an insert request to add or update a Factual row.

Author(s):
brandon
 
public class Insert {

  
Holds all parameters for this Insert.
  private final Parameters queryParams = new Parameters();
  public Insert() {
  }

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

Parameters:
values values this submit is initialized with
  public Insert(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 insert 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 Insert
  public Insert setValue(String fieldObject value) {
    return this;
  }

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

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