Examples of OpportunityEntity


Examples of com.force.sdk.jpa.entities.OpportunityEntity

        // Make sure we have cleaned out the org for this data
        deleteAll("Opportunity");
        final String accName = "Account for testing subqueries";
        deleteAll("Account", " a where a.name = '" + accName + "'");

        OpportunityEntity opp1 = new OpportunityEntity();
        opp1.setStageName("Prospecting");
        opp1.setCloseDate(Calendar.getInstance().getTime());
        opp1.setName("opp1 subquery");

        OpportunityEntity opp2 = new OpportunityEntity();
        opp2.setStageName("Prospecting");
        opp2.setCloseDate(Calendar.getInstance().getTime());
        opp2.setName("opp2 subquery");

        AccountEntity parentAccount = new AccountEntity();
        parentAccount.setName(accName);
        opp1.setTheAccount(parentAccount);
        opp2.setTheAccount(parentAccount);

        addTestDataInTx(Lists.newArrayList(parentAccount, opp1, opp2));

        List<AccountEntity> result =
            em.createNativeQuery("select id, name, (select id, name, stageName from Opportunities) from Account "
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.