Package org.apache.cayenne

Examples of org.apache.cayenne.ResultIterator.nextRow()


        ResultIterator it = dataContext.performIteratedQuery(query);
        try {

            while (it.hasNextRow()) {
                elementsList.add(it.nextRow());
            }
        } finally {
            it.close();
        }
View Full Code Here


                        insertObserver.clear();
                    }

                    currentRow++;

                    Map<String, Object> nextRow = (DataRow) result.nextRow();
                    insert.add(nextRow);
                }

                // commit remaining batch if needed
                if (insert.size() > 0) {
View Full Code Here

            long i = 0;

            while (it.hasNextRow()) {
                i++;

                DataRow row = (DataRow) it.nextRow();
                assertEquals(3, row.size());
                assertEquals("artist" + (1 + i), row.get("ARTIST_NAME"));
            }

            assertEquals(4, i);
View Full Code Here

        // just for this test increase pool size
        changeMaxConnections(1);

        try {
            while (it.hasNextRow()) {
                DataRow row = (DataRow) it.nextRow();

                // try instantiating an object and fetching its relationships
                Artist artist = context.objectFromDataRow(Artist.class, row);
                List<?> paintings = artist.getPaintingArray();
                assertNotNull(paintings);
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.