Class SObjectBatchResult
- java.lang.Object
-
- org.apache.camel.component.salesforce.api.dto.composite.SObjectBatchResult
-
- All Implemented Interfaces:
Serializable
public final class SObjectBatchResult extends Object implements Serializable
Contains the individual result of Composite API batch request. As batch requests can partially succeed or fail make sure you check thegetStatusCode()
for status of the specific request. The result of the request can vary from API to API so here it is given asObject
, in most cases it will be aMap
with string keys and values or otherMap
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()
returningMap
created like:{ @code Map
result = new HashMap<>(); result.put("id", "0010Y00000Ary91QAB"); result.put("success", Boolean.TRUE); result.put("errors", Collections.emptyList()); } getResult()
returningMap
created like:{ @code Map
result = new HashMap<>(); Map 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SObjectBatchResult(int statusCode, Object result)
-