Package com.sforce.soap.partner.sobject

Examples of com.sforce.soap.partner.sobject.SObject


        };
    }
   
    @Test(dataProvider = "minFunctionProvider")
    public void testMinReturnType(String minFunction, Class<Object> expectedReturnType) {
        SObject sobject = createSObject("AggregateResult");
        sobject.setField("expr0", 1.0d);
               
        mockQueryConn.setSObjectsForQueryResult(Lists.newArrayList(sobject));
       
        String query = "select " + minFunction + " from " + DataTypesTestEntity.class.getSimpleName() + " o";
        Object result = em.createQuery(query).getSingleResult();
View Full Code Here


        };
    }
   
    @Test(dataProvider = "sumFunctionProvider")
    public void testSumReturnType(String sumFunction, Class<Object> expectedReturnType) {
        SObject sobject = createSObject("AggregateResult");
        sobject.setField("expr0", 1.0d);
               
        mockQueryConn.setSObjectsForQueryResult(Lists.newArrayList(sobject));
       
        String query = "select " + sumFunction + " from " + DataTypesTestEntity.class.getSimpleName() + " o";
        Object result = em.createQuery(query).getSingleResult();
View Full Code Here

public class QueryReturnTypeTest extends BaseJPAQueryTest {
   
    @SuppressWarnings("unchecked")
    @Test
    public void testBooleanReturnType() {
        SObject sobject = createSObject("DataTypesTestEntity__c");
        sobject.setField("booleanType__c", "true");
               
        mockQueryConn.setSObjectsForQueryResult(Lists.newArrayList(sobject));
        mockQueryConn.setExpectedSoqlQuery("select o.booleanType__c from datatypestestentity__c o ");
       
        String query = "select o.booleanType from " + DataTypesTestEntity.class.getSimpleName() + " o";
View Full Code Here

    }
   
    @SuppressWarnings("unchecked")
    @Test
    public void testBooleanObjectReturnType() {
        SObject sobject = createSObject("DataTypesTestEntity__c");
        sobject.setField("booleanObject__c", "true");
               
        mockQueryConn.setSObjectsForQueryResult(Lists.newArrayList(sobject));
        mockQueryConn.setExpectedSoqlQuery("select o.booleanObject__c from datatypestestentity__c o ");
       
        String query = "select o.booleanObject from " + DataTypesTestEntity.class.getSimpleName() + " o";
View Full Code Here

    }
   
    @SuppressWarnings("unchecked")
    @Test
    public void testByteReturnType() {
        SObject sobject = createSObject("DataTypesTestEntity__c");
        sobject.setField("byteType__c", "1");
               
        mockQueryConn.setSObjectsForQueryResult(Lists.newArrayList(sobject));
        mockQueryConn.setExpectedSoqlQuery("select o.byteType__c from datatypestestentity__c o ");
       
        String query = "select o.byteType from " + DataTypesTestEntity.class.getSimpleName() + " o";
View Full Code Here

    }
   
    @SuppressWarnings("unchecked")
    @Test
    public void testByteObjectReturnType() {
        SObject sobject = createSObject("DataTypesTestEntity__c");
        sobject.setField("byteObject__c", "1");
               
        mockQueryConn.setSObjectsForQueryResult(Lists.newArrayList(sobject));
        mockQueryConn.setExpectedSoqlQuery("select o.byteObject__c from datatypestestentity__c o ");
       
        String query = "select o.byteObject from " + DataTypesTestEntity.class.getSimpleName() + " o";
View Full Code Here

    }
   
    @SuppressWarnings("unchecked")
    @Test
    public void testBigDecimalObjectReturnType() {
        SObject sobject = createSObject("DataTypesTestEntity__c");
        sobject.setField("bigDecimalObject__c", "1.0");
               
        mockQueryConn.setSObjectsForQueryResult(Lists.newArrayList(sobject));
        mockQueryConn.setExpectedSoqlQuery("select o.bigDecimalObject__c from datatypestestentity__c o ");
       
        String query = "select o.bigDecimalObject from " + DataTypesTestEntity.class.getSimpleName() + " o";
View Full Code Here

    }
   
    @SuppressWarnings("unchecked")
    @Test
    public void testBigIntegerObjectReturnType() {
        SObject sobject = createSObject("DataTypesTestEntity__c");
        sobject.setField("bigIntegerObject__c", "1.0");
               
        mockQueryConn.setSObjectsForQueryResult(Lists.newArrayList(sobject));
        mockQueryConn.setExpectedSoqlQuery("select o.bigIntegerObject__c from datatypestestentity__c o ");
       
        String query = "select o.bigIntegerObject from " + DataTypesTestEntity.class.getSimpleName() + " o";
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    @Test
    public void testCalendarReturnType() {
        SObject sobject = createSObject("DataTypesTestEntity__c");
        sobject.setField("dateTimeCal__c", "1970-01-01T00:00:00.000Z");
               
        mockQueryConn.setSObjectsForQueryResult(Lists.newArrayList(sobject));
        mockQueryConn.setExpectedSoqlQuery("select o.dateTimeCal__c from datatypestestentity__c o ");
       
        String query = "select o.dateTimeCal from " + DataTypesTestEntity.class.getSimpleName() + " o";
View Full Code Here

            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.sobject.SObject

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.