Search in sources :

Example 1 with UpdatedResult

use of org.teiid.translator.salesforce.execution.UpdatedResult in project teiid by teiid.

the class SalesforceConnectionImpl method getUpdated.

public UpdatedResult getUpdated(String objectType, Calendar startDate, Calendar endDate) throws ResourceException {
    GetUpdatedResult updated;
    try {
        updated = partnerConnection.getUpdated(objectType, startDate, endDate);
    } catch (InvalidSObjectFault e) {
        throw new ResourceException(e);
    } catch (UnexpectedErrorFault e) {
        throw new ResourceException(e);
    } catch (ConnectionException e) {
        throw new ResourceException(e);
    }
    UpdatedResult result = new UpdatedResult();
    result.setLatestDateCovered(updated.getLatestDateCovered());
    result.setIDs(Arrays.asList(updated.getIds()));
    return result;
}
Also used : InvalidSObjectFault(com.sforce.soap.partner.fault.InvalidSObjectFault) UpdatedResult(org.teiid.translator.salesforce.execution.UpdatedResult) ResourceException(javax.resource.ResourceException) UnexpectedErrorFault(com.sforce.soap.partner.fault.UnexpectedErrorFault) ConnectionException(com.sforce.ws.ConnectionException)

Aggregations

InvalidSObjectFault (com.sforce.soap.partner.fault.InvalidSObjectFault)1 UnexpectedErrorFault (com.sforce.soap.partner.fault.UnexpectedErrorFault)1 ConnectionException (com.sforce.ws.ConnectionException)1 ResourceException (javax.resource.ResourceException)1 UpdatedResult (org.teiid.translator.salesforce.execution.UpdatedResult)1