Search in sources :

Example 1 with QueryResultList

use of org.apache.camel.component.salesforce.api.dto.bulk.QueryResultList in project camel by apache.

the class DefaultBulkApiClient method getQueryResultIds.

@Override
public void getQueryResultIds(String jobId, String batchId, final QueryResultIdsCallback callback) {
    final Request get = getRequest(HttpMethod.GET, batchResultUrl(jobId, batchId, null));
    // make the call and parse the result
    doHttpRequest(get, new ClientResponseCallback() {

        @Override
        public void onResponse(InputStream response, SalesforceException ex) {
            QueryResultList value = null;
            try {
                value = unmarshalResponse(response, get, QueryResultList.class);
            } catch (SalesforceException e) {
                ex = e;
            }
            callback.onResponse(value != null ? Collections.unmodifiableList(value.getResult()) : null, ex);
        }
    });
}
Also used : SalesforceException(org.apache.camel.component.salesforce.api.SalesforceException) QueryResultList(org.apache.camel.component.salesforce.api.dto.bulk.QueryResultList) InputStream(java.io.InputStream) Request(org.eclipse.jetty.client.api.Request)

Aggregations

InputStream (java.io.InputStream)1 SalesforceException (org.apache.camel.component.salesforce.api.SalesforceException)1 QueryResultList (org.apache.camel.component.salesforce.api.dto.bulk.QueryResultList)1 Request (org.eclipse.jetty.client.api.Request)1