Class SObjectBatchResult
java.lang.Object
org.apache.camel.component.salesforce.api.dto.composite.SObjectBatchResult
- All Implemented Interfaces:
Serializable
Contains the individual result of Composite API batch request. As batch requests can partially succeed or fail make
sure you check the
getStatusCode()
for status of the specific request. The result of the request can vary
from API to API so here it is given as Object
, in most cases it will be a Map
with string keys and
values or other Map
as value. Requests are made in JSON format hold some type information (i.e. it is known
what values are strings and what values are numbers).
For example response for SObject record creation in JSON will be:
{ "statusCode": 201, "result": { "id" : "0010Y00000Ary8hQAB", "success" : true, "errors" : [] } }
Which will result in getResult()
returning Map
created like:
And that results in{ @code Map<String, Object> result = new HashMap<>(); result.put("id", "0010Y00000Ary91QAB"); result.put("success", Boolean.TRUE); result.put("errors", Collections.emptyList()); }
getResult()
returning Map
created like: { @code Map<String, Object> result = new HashMap<>(); Map<String, Object> nestedResult = new HashMap<>(); result.put("Result", nestedResult); nestedResult.put("id", "0010Y00000Ary91QAB"); nestedResult.put("success", "true"); }
Note the differences between type and nested Map
one level deeper in the case of XML.
- See Also:
-
Constructor Summary
Constructors -
Method Summary