Package org.apache.cayenne.query

Examples of org.apache.cayenne.query.SQLAction.performAction()


        MockOperationObserver observer = new MockOperationObserver();
        Connection c = dataSource.getConnection();

        try {
            plan.performAction(c, observer);
        }
        finally {
            c.close();
        }
View Full Code Here


        SQLAction action = adapter.getAction(template, node);

        Connection c = dataSource.getConnection();
        try {
            MockOperationObserver observer = new MockOperationObserver();
            action.performAction(c, observer);

            int[] batches = observer.countsForQuery(template);
            assertNotNull(batches);
            assertEquals(1, batches.length);
            assertEquals(1, batches[0]);
View Full Code Here

        SQLAction action = adapter.getAction(template, node);

        Connection c = dataSource.getConnection();
        try {
            MockOperationObserver observer = new MockOperationObserver();
            action.performAction(c, observer);

            int[] batches = observer.countsForQuery(template);
            assertNotNull(batches);
            assertEquals(1, batches.length);
            assertEquals(4, batches[0]);
View Full Code Here

                return observer.isIteratedResult();
            }
        };

        SQLAction action = node.getAdapter().getAction(originalQuery, node);
        action.performAction(connection, wrapper);
    }
}
View Full Code Here

        // remember root query ... it will be used to map the results, even if SQLAction
        // uses query substitute...
        this.currentQuery = query;

        SQLAction action = node.getAdapter().getAction(query, node);
        action.performAction(connection, this);
    }

    public void nextBatchCount(Query query, int[] resultCount) {
        observer.nextBatchCount(currentQuery, resultCount);
    }
View Full Code Here

        SQLTemplate template = new SQLTemplate(Object.class, templateString);
        SQLAction action = getNode().getAdapter().getAction(template, getNode());

        Connection c = getConnection();
        try {
            action.performAction(c, new MockOperationObserver());
        }
        finally {
            c.close();
        }
    }
View Full Code Here

        MockOperationObserver observer = new MockOperationObserver();
        Connection c = getConnection();

        try {
            plan.performAction(c, observer);
        }
        finally {
            c.close();
        }
View Full Code Here

        MockOperationObserver observer = new MockOperationObserver();
        Connection c = getConnection();

        try {
            plan.performAction(c, observer);
        }
        finally {
            c.close();
        }
View Full Code Here

        MockOperationObserver observer = new MockOperationObserver();
        Connection c = getConnection();

        try {
            plan.performAction(c, observer);
        }
        finally {
            c.close();
        }
View Full Code Here

        MockOperationObserver observer = new MockOperationObserver();
        Connection c = getConnection();

        try {
            plan.performAction(c, observer);
        }
        finally {
            c.close();
        }
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.