Package com.salesforce.dataloader.dao.csv

Examples of com.salesforce.dataloader.dao.csv.CSVFileReader.readRow()


        try {
            resultReader.open();

            // go through item by item and assert that it's there
            Row row;
            while ((row = resultReader.readRow()) != null) {
                final String resultId = (String)row.get(Config.ID_COLUMN_NAME);
                assertValidId(resultId);
                if (!expectedIds.remove(resultId)) {
                    unexpectedIds.add(resultId);
                }
View Full Code Here


                    "Batch failed: InvalidBatch : Failed to process query: FUNCTIONALITY_NOT_ENABLED: Foreign Key Relationships not supported in Bulk Query");
        } else {
            runProcess(argMap, 1);
            final CSVFileReader resultReader = new CSVFileReader(argMap.get(Config.DAO_NAME), getController());
            try {
                final Row resultRow = resultReader.readRow();
                assertEquals("Query returned incorrect Contact ID", contactId, resultRow.get("CONTACT_ID"));
                assertEquals("Query returned incorrect Contact Name", "First 000000 Last 000000",
                        resultRow.get("CONTACT_NAME"));
                assertEquals("Query returned incorrect Account ID", accountId, resultRow.get("ACCOUNT_ID"));
                assertEquals("Query returned incorrect Account Name", "account insert#000000",
View Full Code Here

                // run the extract
                runProcess(argmap, 1);
                // open the results of the extraction
                final CSVFileReader rdr = new CSVFileReader(argmap.get(Config.DAO_NAME), getController());
                rdr.open();
                Row row = rdr.readRow();
                assertNotNull(row);
                assertEquals(5,row.size());
                // validate the extract results are correct.
                assertEquals(leadidArr[0], row.get("LID"));
                assertEquals("loader", row.get("LNAME"));
View Full Code Here

                assertEquals("loader", row.get("LNAME"));
                assertEquals("data loader", row.get("NAME__RESULT"));
                assertEquals(uid, row.get("OID"));
                assertEquals(uid,row.get("OWNID"));
                // validate that we have read the only result. there should be only one.
                assertNull(rdr.readRow());

            }
        } finally {
            // cleanup here since the parent doesn't clean up leads
            getBinding().delete(leadidArr);
View Full Code Here

                    "Batch failed: InvalidBatch : Failed to process query: FUNCTIONALITY_NOT_ENABLED: Aggregate Relationships not supported in Bulk Query");
        } else {
            runProcess(argMap, 1, true);
            final CSVFileReader resultReader = new CSVFileReader(argMap.get(Config.DAO_NAME), getController());
            try {
                assertEquals(String.valueOf(numRecords - 1), resultReader.readRow().get("MAX(NUMBEROFEMPLOYEES)"));
            } finally {
                resultReader.close();
            }
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.