Search in sources :

Example 1 with TSalesforceGetUpdatedProperties

use of org.talend.components.salesforce.tsalesforcegetupdated.TSalesforceGetUpdatedProperties in project components by Talend.

the class SalesforceSource method createReader.

@Override
public BoundedReader createReader(RuntimeContainer adaptor) {
    if (properties instanceof TSalesforceInputProperties) {
        TSalesforceInputProperties sfInProperties = (TSalesforceInputProperties) properties;
        boolean isBulk = TSalesforceInputProperties.QueryMode.Bulk.equals(sfInProperties.queryMode.getValue());
        sfInProperties.connection.bulkConnection.setValue(isBulk);
        if (isBulk) {
            return new SalesforceBulkQueryInputReader(adaptor, this, sfInProperties);
        } else {
            return new SalesforceInputReader(adaptor, this, sfInProperties);
        }
    } else if (properties instanceof TSalesforceGetServerTimestampProperties) {
        return new SalesforceServerTimeStampReader(adaptor, this, (TSalesforceGetServerTimestampProperties) properties);
    } else if (properties instanceof TSalesforceGetDeletedProperties) {
        return new SalesforceGetDeletedReader(adaptor, this, (TSalesforceGetDeletedProperties) properties);
    } else if (properties instanceof TSalesforceGetUpdatedProperties) {
        return new SalesforceGetUpdatedReader(adaptor, this, (TSalesforceGetUpdatedProperties) properties);
    } else if (properties instanceof TSalesforceBulkExecProperties) {
        ((TSalesforceBulkExecProperties) properties).connection.bulkConnection.setValue(true);
        return new SalesforceBulkExecReader(adaptor, this, (TSalesforceBulkExecProperties) properties);
    }
    return null;
}
Also used : TSalesforceGetDeletedProperties(org.talend.components.salesforce.tsalesforcegetdeleted.TSalesforceGetDeletedProperties) TSalesforceGetServerTimestampProperties(org.talend.components.salesforce.tsalesforcegetservertimestamp.TSalesforceGetServerTimestampProperties) TSalesforceInputProperties(org.talend.components.salesforce.tsalesforceinput.TSalesforceInputProperties) TSalesforceGetUpdatedProperties(org.talend.components.salesforce.tsalesforcegetupdated.TSalesforceGetUpdatedProperties) TSalesforceBulkExecProperties(org.talend.components.salesforce.tsalesforcebulkexec.TSalesforceBulkExecProperties)

Aggregations

TSalesforceBulkExecProperties (org.talend.components.salesforce.tsalesforcebulkexec.TSalesforceBulkExecProperties)1 TSalesforceGetDeletedProperties (org.talend.components.salesforce.tsalesforcegetdeleted.TSalesforceGetDeletedProperties)1 TSalesforceGetServerTimestampProperties (org.talend.components.salesforce.tsalesforcegetservertimestamp.TSalesforceGetServerTimestampProperties)1 TSalesforceGetUpdatedProperties (org.talend.components.salesforce.tsalesforcegetupdated.TSalesforceGetUpdatedProperties)1 TSalesforceInputProperties (org.talend.components.salesforce.tsalesforceinput.TSalesforceInputProperties)1