Package com.sforce.soap.partner

Examples of com.sforce.soap.partner.QueryResult


        };
    }
   
    @Test(dataProvider = "countFunctionProvider")
    public void testCountReturnType(String countFunction, Class<Object> expectedReturnType) {
        QueryResult qr = new QueryResult();
        qr.setDone(true);
        qr.setSize(2); // Count queries return a size, but no results
       
        mockQueryConn.setReturnedQueryResult(qr);
       
        String query = "select " + countFunction + " from " + DataTypesTestEntity.class.getSimpleName() + " o";
        Object result = em.createQuery(query).getSingleResult();
View Full Code Here


                throw thrownConnectionException;
            }
           
            // Return any registered results
            if (returnedQueryResult != null) return returnedQueryResult;
            return new QueryResult();
        }
View Full Code Here

        }
       
        // Convenience method that allows a test to construct
        // a QueryResult based on the SObjects that are to be returned
        public void setSObjectsForQueryResult(List<SObject> sobjects) {
            returnedQueryResult = new QueryResult();
            returnedQueryResult.setDone(true);
            returnedQueryResult.setRecords(sobjects.toArray(new SObject[sobjects.size()]));
            returnedQueryResult.setSize(sobjects.size());
        }
View Full Code Here

        this.acmd = objectProvider.getClassMetaData();
        this.storeManager = storeManager;
        this.mconn = mconn;
        this.table = storeManager.getTable(objectProvider.getClassMetaData());
        if (pkValue != null) {
            QueryResult qr = ((PartnerConnection) mconn.getConnection()).query(
                    new ForceQueryUtils(objectProvider.getExecutionContext(), mconn, null, null, null, null)
                    .buildQueryWithPK(table, objectProvider.getClassMetaData(), fieldNumbers, (String) pkValue, 0));
            if (qr.getSize() == 0) {
                throw new NucleusObjectNotFoundException();
            }
            this.sobject = qr.getRecords()[0];
        } else {
            this.sobject = new SObject();
        }
       
        this.query = query;
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.