Package com.sforce.soap.partner

Examples of com.sforce.soap.partner.QueryResult


    }

    @Test
    public void testDateUsingDefaultTimeZone() throws Exception {
        runProcess(getTestConfig(OperationInfo.insert, false), 1);
        QueryResult qr = getBinding().query("select CustomDateTime__c from Account where AccountNumber__c='ACCT_0'");
        assertEquals(1, qr.getSize());

        Date expectedDate = parseDateWithTimezone("2010-10-14T12:00:00.000PDT");
        assertEquals(expectedDate, parseDateFromPartnerApi((String)qr.getRecords()[0].getField("CustomDateTime__c")));
    }
View Full Code Here


    }

    @Test
    public void testDateWithTimeZone() throws Exception {
        runProcess(getTestConfig(OperationInfo.insert, false), 1);
        QueryResult qr = getBinding().query("select CustomDateTime__c from Account where AccountNumber__c='ACCT_0'");
        assertEquals(1, qr.getSize());

        Date expectedDate = parseDateWithTimezone("2010-10-14T12:00:00.000-0300");
        assertEquals(expectedDate, parseDateFromPartnerApi((String)qr.getRecords()[0].getField("CustomDateTime__c")));
    }
View Full Code Here

                } else {
                    sb.append(" LIMIT " + maxRows);
                }
            }

            final QueryResult result = executeSoqlQuery(sb.toString());

            DataSet dataSet = new SalesforceDataSet(columns, result, _connection);

            if (firstRow != null) {
                // OFFSET is still only a developer preview feature of SFDC. See
View Full Code Here

            // unable to rewrite to SOQL, counting will be done client side.
            return null;
        }

        final QueryResult queryResult = executeSoqlQuery(query);

        assert queryResult.isDone();

        return queryResult.getSize();
    }
View Full Code Here

        if (maxRows > 0) {
            sb.append(" LIMIT " + maxRows);
        }

        final QueryResult queryResult = executeSoqlQuery(sb.toString());
        return new SalesforceDataSet(columns, queryResult, _connection);
    }
View Full Code Here

    }

    private QueryResult executeSoqlQuery(String query) {
        logger.info("Executing SOQL query: {}", query);
        try {
            QueryResult queryResult = _connection.query(query);
            return queryResult;
        } catch (ConnectionException e) {
            throw SalesforceUtils.wrapException(e, "Failed to invoke query service");
        }
    }
View Full Code Here

                } else {
                    sb.append(" LIMIT " + maxRows);
                }
            }

            final QueryResult result = executeSoqlQuery(sb.toString());

            DataSet dataSet = new SalesforceDataSet(columns, result, _connection);

            if (firstRow != null) {
                // OFFSET is still only a developer preview feature of SFDC. See
View Full Code Here

            // unable to rewrite to SOQL, counting will be done client side.
            return null;
        }

        final QueryResult queryResult = executeSoqlQuery(query);

        assert queryResult.isDone();

        return queryResult.getSize();
    }
View Full Code Here

        if (maxRows > 0) {
            sb.append(" LIMIT " + maxRows);
        }

        final QueryResult queryResult = executeSoqlQuery(sb.toString());
        return new SalesforceDataSet(columns, queryResult, _connection);
    }
View Full Code Here

    }

    private QueryResult executeSoqlQuery(String query) {
        logger.info("Executing SOQL query: {}", query);
        try {
            QueryResult queryResult = _connection.query(query);
            return queryResult;
        } catch (ConnectionException e) {
            throw SalesforceUtils.wrapException(e, "Failed to invoke query service");
        }
    }
View Full Code Here

TOP

Related Classes of com.sforce.soap.partner.QueryResult

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.