@Test public void testQuery() throws IOException { RestQueryResult result = conn.query("SELECT Id,Name,Description FROM Product2 WHERE Id = '01t50000001L5cT'"); assertNull(result.getQueryLocator()); assertTrue(result.isDone()); assertEquals(1, result.getSObjects().size()); SObject object = result.getSObjects().get(0); assertEquals("01t50000001L5cT", object.getId().toString()); assertEquals("GenWatt Diesel 200kW", object.getField("Name")); assertNull(object.getField("Description")); assertEquals(2, object.getAllFields().size()); assertEquals("Product2", object.getType()); assertTrue(object.isFieldSet("Description")); assertFalse(object.isFieldSet("Foo")); }
@Override @Nonnull public RestQueryResult query(String soql) throws IOException { Timer.Context context = queryTimer.time(); String json; try { json = this.getHttpApiClient().query(soql); } finally { context.stop(); } return getQueryResult(this.objectReader.readValue(parse(json), JsonNode.class)); }
RestConnectionImpl implements RestConnection { @Override @Nonnull public RestQueryResult query(String soql) throws IOException { Timer.Context context = queryTimer.time(); String json; try { json = this.getHttpApiClient().query(soql); } finally { context.stop(); } return getQueryResult(this.objectReader.readValue(parse(json), JsonNode.class)); } }
RestConnectionImpl implements RestConnection { @Override @Nonnull public RestQueryResult query(String soql) throws IOException { Timer.Context context = queryTimer.time(); String json; try { json = this.getHttpApiClient().query(soql); } finally { context.stop(); } return getQueryResult(this.objectReader.readValue(parse(json), JsonNode.class)); } RestConnectionImpl(ObjectReader objectReader, HttpApiClientProvider httpApiClientProvider,
            MetricRegistry metricRegistry); }
RestConnectionImpl implements RestConnection { @Override @Nonnull public RestQueryResult query(String soql) throws IOException { Timer.Context context = queryTimer.time(); String json; try { json = this.getHttpApiClient().query(soql); } finally { context.stop(); } return getQueryResult(this.objectReader.readValue(parse(json), JsonNode.class)); } RestConnectionImpl(ObjectReader objectReader, HttpApiClientProvider httpApiClientProvider,
            MetricRegistry metricRegistry); @Override @Nonnull SaveResult create(SObject sObject); @Override void delete(String sObjectType, Id id); @Override @Nonnull DescribeGlobalResult describeGlobal(); @Override @Nonnull SObjectDescription describeSObject(String sObjectType); @Override @Nonnull BasicSObjectMetadataResult getBasicObjectInfo(String sObjectType); @Override @Nonnull RestQueryResult query(String soql); @Override @Nonnull RestQueryResult queryMore(RestQueryLocator queryLocator); @Override @Nonnull SObject retrieve(String sObjectType, Id id, List<String> fields); @Override @Nonnull List<SObject> search(String sosl); @Override void update(SObject sObject); @Override @Nonnull UpsertResult upsert(SObject sObject, String externalIdField); }
RestConnectionImpl implements RestConnection { @Override @Nonnull public RestQueryResult query(String soql) throws IOException { Timer.Context context = queryTimer.time(); String json; try { json = this.getHttpApiClient().query(soql); } finally { context.stop(); } return getQueryResult(this.objectReader.readValue(parse(json), JsonNode.class)); } RestConnectionImpl(ObjectReader objectReader, HttpApiClientProvider httpApiClientProvider,
            MetricRegistry metricRegistry); @Override @Nonnull SaveResult create(SObject sObject); @Override void delete(String sObjectType, Id id); @Override @Nonnull DescribeGlobalResult describeGlobal(); @Override @Nonnull SObjectDescription describeSObject(String sObjectType); @Override @Nonnull BasicSObjectMetadataResult getBasicObjectInfo(String sObjectType); @Override @Nonnull RestQueryResult query(String soql); @Override @Nonnull RestQueryResult queryMore(RestQueryLocator queryLocator); @Override @Nonnull SObject retrieve(String sObjectType, Id id, List<String> fields); @Override @Nonnull List<SObject> search(String sosl); @Override void update(SObject sObject); @Override @Nonnull UpsertResult upsert(SObject sObject, String externalIdField);  }