Package com.salesforce.dataloader.action

Examples of com.salesforce.dataloader.action.OperationInfo


    private void doExtractAccountDb(String processName, int expectedSuccesses, int expectedFailures, boolean isInsert)
            throws ProcessInitializationException, DataAccessObjectException {

        // specify the name of the configured process and select appropriate database access type
        OperationInfo op = isInsert ? OperationInfo.insert : OperationInfo.update;
        Map<String, String> argMap = getTestConfig();
        argMap.put(Config.OPERATION, OperationInfo.extract.name());
        argMap.put(ProcessRunner.PROCESS_NAME, processName);
        argMap.put(Config.DAO_NAME, op.name() + "Account");
        argMap.put(Config.OUTPUT_SUCCESS, new File(getTestStatusDir(), baseName + op.name() + "Success.csv")
        .getAbsolutePath());
        argMap.put(Config.OUTPUT_ERROR, new File(getTestStatusDir(), baseName + op.name() + "Error.csv")
        .getAbsolutePath());
        argMap.put(Config.ENABLE_EXTRACT_STATUS_OUTPUT, Config.TRUE);
        argMap.put(Config.DAO_WRITE_BATCH_SIZE, String.valueOf(BATCH_SIZE));

        Date startTime = new Date();
View Full Code Here


    /**
     * Function to dynamically set the entity list
     */
    private void setInput(Map<String, DescribeGlobalSObjectResult> entityDescribes) {
        OperationInfo operation = controller.getConfig().getOperationInfo();
        Map<String, DescribeGlobalSObjectResult> inputDescribes = new HashMap<String, DescribeGlobalSObjectResult>();

        // for each object, check whether the object is valid for the current
        // operation
        if (entityDescribes != null) {
            for (Entry<String, DescribeGlobalSObjectResult> entry : entityDescribes.entrySet()) {
                String objectName = entry.getKey();
                DescribeGlobalSObjectResult objectDesc = entry.getValue();
                if (operation.isDelete() && objectDesc.isDeletable()) {
                    inputDescribes.put(objectName, objectDesc);
                } else if (operation == OperationInfo.insert && objectDesc.isCreateable()) {
                    inputDescribes.put(objectName, objectDesc);
                } else if (operation == OperationInfo.update && objectDesc.isUpdateable()) {
                    inputDescribes.put(objectName, objectDesc);
View Full Code Here

                                                                    int numFailures, AttachmentTemplateListener myAttachmentTemplateListener, String... files)
            throws ProcessInitializationException, DataAccessObjectException, ConnectionException, IOException {
        int numInserts = 0;
        int numUpdates = 0;

        OperationInfo op = OperationInfo.valueOf(argMap.get(Config.OPERATION));
        if (op == OperationInfo.insert)
            numInserts = numSuccesses;
        else if (op != null && op != OperationInfo.upsert)
            numUpdates = numSuccesses;
        else
View Full Code Here

    private Controller runProcessWithErrors(Map<String, String> argMap, int numSuccesses, int numFailures,
            boolean emptyId) throws ProcessInitializationException, DataAccessObjectException {
        int numInserts = 0;
        int numUpdates = 0;

        OperationInfo op = OperationInfo.valueOf(argMap.get(Config.OPERATION));
        if (op == OperationInfo.insert)
            numInserts = numSuccesses;
        else if (op != null && op != OperationInfo.upsert)
            numUpdates = numSuccesses;
        else
View Full Code Here

    private void updateSforce() {

        ArrayList<Field> mappableFieldList = new ArrayList<Field>();
        ArrayList<Field> allFieldList = new ArrayList<Field>();
        Field field;
        OperationInfo operation = controller.getConfig().getOperationInfo();
        for (int i = 0; i < sforceFieldInfo.length; i++) {

            field = sforceFieldInfo[i];
            boolean isMappable = false;
            switch (operation) {
View Full Code Here

    public void setConfigDefaults() {
        config.setDefaults();
    }

    public synchronized void executeAction(ILoaderProgress monitor) throws DataAccessObjectException, OperationException {
        OperationInfo operation = this.config.getOperationInfo();
        IAction action = operation.instantiateAction(this, monitor);
        logger.info(Messages.getFormattedString("Controller.executeStart", operation)); //$NON-NLS-1$
        action.execute();
    }
View Full Code Here

TOP

Related Classes of com.salesforce.dataloader.action.OperationInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.