Examples of performQuery()


Examples of org.apache.cayenne.access.DataContext.performQuery()

        insertValue();
        DataContext contex = createDataContext();
        String ejbql = "select a FROM Artist a";
        EJBQLQuery query = new EJBQLQuery(ejbql);
        query.setCacheStrategy(QueryCacheStrategy.LOCAL_CACHE);
        List<Artist> artist1 = contex.performQuery(query);
        blockQueries();
        List<Artist> artist2;
        try {
            EJBQLQuery query1 = new EJBQLQuery(ejbql);
            query1.setCacheStrategy(QueryCacheStrategy.LOCAL_CACHE);
View Full Code Here

Examples of org.apache.cayenne.access.DataContext.performQuery()

        blockQueries();
        List<Artist> artist2;
        try {
            EJBQLQuery query1 = new EJBQLQuery(ejbql);
            query1.setCacheStrategy(QueryCacheStrategy.LOCAL_CACHE);
            artist2 = contex.performQuery(query1);
        }
        finally {
            unblockQueries();
        }
View Full Code Here

Examples of org.apache.cayenne.access.DataContext.performQuery()

        DataContext contex = createDataContext();

        String ejbql = "SELECT p.toArtist FROM Painting p";
        EJBQLQuery query = new EJBQLQuery(ejbql);

        List result = contex.performQuery(query);

        assertNotNull(result);
        assertEquals(2, result.size());

        assertEquals(Artist.class, result.get(0).getClass());
View Full Code Here

Examples of org.apache.cayenne.access.DataContext.performQuery()


        String ejbql2 = "SELECT p.toArtist, p FROM Painting p";
        EJBQLQuery query2 = new EJBQLQuery(ejbql2);

        List result2 = contex.performQuery(query2);

        assertNotNull(result2);
        assertEquals(2, result2.size());
        assertEquals(2, ((Object[])result2.get(0)).length);
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.