Examples of firstUpdateCount()


Examples of org.apache.cayenne.QueryResponse.firstUpdateCount()

        String ejbql = "delete from Painting AS p WHERE p.paintingTitle = 'P2'";
        EJBQLQuery query = new EJBQLQuery(ejbql);

        QueryResponse result = context.performGenericQuery(query);

        int[] count = result.firstUpdateCount();
        assertNotNull(count);
        assertEquals(1, count.length);
        assertEquals(1, count[0]);

        ObjectContext freshContext = runtime.getContext();
View Full Code Here

Examples of org.apache.cayenne.QueryResponse.firstUpdateCount()

        EJBQLQuery query = new EJBQLQuery(ejbql);
        query.setParameter("id", id);
        QueryResponse result = context.performGenericQuery(query);

        int[] count = result.firstUpdateCount();
        assertNotNull(count);
        assertEquals(1, count.length);
        assertEquals(33, count[0]);
    }
}
View Full Code Here

Examples of org.apache.cayenne.QueryResponse.firstUpdateCount()

     */
    public int executeUpdate() {
        // TODO: check transaction

        QueryResponse response = context.performGenericQuery(getQuery());
        int[] res = response.firstUpdateCount();

        if (res == null) {
            return -1;
        }

View Full Code Here

Examples of org.apache.cayenne.QueryResponse.firstUpdateCount()

     */
    public int executeUpdate() {
        // TODO: check transaction

        QueryResponse response = context.performGenericQuery(getQuery());
        int[] res = response.firstUpdateCount();

        if (res == null) {
            return -1;
        }

View Full Code Here

Examples of org.apache.cayenne.QueryResponse.firstUpdateCount()

        String ejbql = "delete from Painting";
        EJBQLQuery query = new EJBQLQuery(ejbql);

        QueryResponse result = createDataContext().performGenericQuery(query);

        int[] count = result.firstUpdateCount();
        assertNotNull(count);
        assertEquals(1, count.length);
        assertEquals(2, count[0]);
    }
View Full Code Here

Examples of org.apache.cayenne.QueryResponse.firstUpdateCount()

        String ejbql = "delete from Painting AS p";
        EJBQLQuery query = new EJBQLQuery(ejbql);

        QueryResponse result = createDataContext().performGenericQuery(query);

        int[] count = result.firstUpdateCount();
        assertNotNull(count);
        assertEquals(1, count.length);
        assertEquals(2, count[0]);
    }
View Full Code Here

Examples of org.apache.cayenne.QueryResponse.firstUpdateCount()

        String ejbql = "delete from Painting AS p WHERE p.paintingTitle = 'P2'";
        EJBQLQuery query = new EJBQLQuery(ejbql);

        QueryResponse result = createDataContext().performGenericQuery(query);

        int[] count = result.firstUpdateCount();
        assertNotNull(count);
        assertEquals(1, count.length);
        assertEquals(1, count[0]);

        assertNotNull(DataObjectUtils
View Full Code Here

Examples of org.apache.cayenne.QueryResponse.firstUpdateCount()

        
        EJBQLQuery query = new EJBQLQuery(ejbql);
        query.setParameter("id", id);
        QueryResponse result = createDataContext().performGenericQuery(query);
   
        int[] count = result.firstUpdateCount();
        assertNotNull(count);
        assertEquals(1, count.length);
        assertEquals(420, count[0]);

    }
View Full Code Here

Examples of org.apache.cayenne.QueryResponse.firstUpdateCount()

        String ejbql = "UPDATE Painting AS p SET p.paintingTitle = 'XX' WHERE p.paintingTitle = 'P1'";
        EJBQLQuery query = new EJBQLQuery(ejbql);

        QueryResponse result = context.performGenericQuery(query);

        int[] count = result.firstUpdateCount();
        assertNotNull(count);
        assertEquals(1, count.length);
        assertEquals(1, count[0]);

        notUpdated = DataObjectUtils.objectForQuery(context, check);
View Full Code Here

Examples of org.apache.cayenne.QueryResponse.firstUpdateCount()

        String ejbql = "UPDATE Painting AS p SET p.paintingTitle = 'XX'";
        EJBQLQuery query = new EJBQLQuery(ejbql);

        QueryResponse result = context.performGenericQuery(query);

        int[] count = result.firstUpdateCount();
        assertNotNull(count);
        assertEquals(1, count.length);
        assertEquals(2, count[0]);

        notUpdated = DataObjectUtils.objectForQuery(context, check);
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.