use of org.talend.components.salesforce.runtime.SalesforceBulkRuntime in project components by Talend.
the class SalesforceBulkRuntimeTest method setUp.
@Before
public void setUp() throws Exception {
inputProperties = new TSalesforceInputProperties("input");
conn = mock(BulkConnection.class);
runtime = new SalesforceBulkRuntime(conn);
assertTrue(conn == runtime.getBulkConnection());
}
use of org.talend.components.salesforce.runtime.SalesforceBulkRuntime in project components by Talend.
the class SalesforceBulkQueryReader method start.
@Override
public boolean start() throws IOException {
try {
if (bulkRuntime == null) {
ConnectionHolder connectionHolder = ((SalesforceDataprepSource) getCurrentSource()).getConnectionHolder();
bulkRuntime = new SalesforceBulkRuntime(connectionHolder.bulkConnection);
}
executeSalesforceBulkQuery();
bulkResultSet = bulkRuntime.getQueryResultSet(bulkRuntime.nextResultId());
currentRecord = bulkResultSet.next();
boolean start = currentRecord != null;
if (start) {
dataCount++;
}
return start;
} catch (ConnectionException | AsyncApiException e) {
// Wrap the exception in an IOException.
throw new IOException(e);
}
}
Aggregations