Examples of rowsForQuery()


Examples of org.apache.cayenne.access.MockOperationObserver.rowsForQuery()

        SQLTemplate template = new SQLTemplate(Artist.class, sql);
        template.setColumnNamesCapitalization(CapsStrategy.UPPER);
        MockOperationObserver observer = new MockOperationObserver();
        getDomain().performQueries(Collections.singletonList(template), observer);

        List<Map<String, Object>> data = observer.rowsForQuery(template);
        assertEquals(1, data.size());
        Map<String, Object> row = data.get(0);
        return row;
    }
View Full Code Here

Examples of org.apache.cayenne.access.MockOperationObserver.rowsForQuery()

        MockOperationObserver observer = new MockOperationObserver();
        SelectQuery query = new SelectQuery(Artist.class);
        getDomain().performQueries(Collections.singletonList(query), observer);

        List data = observer.rowsForQuery(query);
        assertEquals(1, data.size());
        Map row = (Map) data.get(0);
        return row;
    }
}
View Full Code Here

Examples of org.apache.cayenne.access.MockOperationObserver.rowsForQuery()

        }
        finally {
            c.close();
        }

        List<DataRow> rows = observer.rowsForQuery(template);
        assertNotNull(rows);
        assertEquals(1, rows.size());
        DataRow row = rows.get(0);

        // In the absence of ObjEntity most DB's return a Long here, except for Oracle
View Full Code Here

Examples of org.apache.cayenne.access.MockOperationObserver.rowsForQuery()

        }
        finally {
            c.close();
        }

        List<DataRow> rows = observer.rowsForQuery(template);
        assertNotNull(rows);
        assertEquals(1, rows.size());
        DataRow row = rows.get(0);

        assertNotNull(row.get("DOB"));
View Full Code Here

Examples of org.apache.cayenne.access.MockOperationObserver.rowsForQuery()

        }
        finally {
            c.close();
        }

        List<DataRow> rows = observer.rowsForQuery(template);
        assertNotNull(rows);
        assertEquals(1, rows.size());
        DataRow row = rows.get(0);

        assertNotNull(row.get("DOB"));
View Full Code Here

Examples of org.apache.cayenne.access.MockOperationObserver.rowsForQuery()

        }
        finally {
            c.close();
        }

        List<DataRow> rows = observer.rowsForQuery(template);
        assertNotNull(rows);
        assertEquals(1, rows.size());
        DataRow row = rows.get(0);

        assertNotNull(row.get("DOB"));
View Full Code Here

Examples of org.apache.cayenne.access.MockOperationObserver.rowsForQuery()

        MockOperationObserver observer = new MockOperationObserver();
        SelectQuery query = new SelectQuery(Artist.class);
        query.addOrdering("db:ARTIST_ID", SortOrder.ASCENDING);
        node.performQueries(Collections.singletonList((Query) query), observer);

        List<DataRow> data = observer.rowsForQuery(query);
        assertEquals(2, data.size());
        DataRow row1 = data.get(0);
        assertEquals(bindings1.get("id"), row1.get("ARTIST_ID"));
        assertEquals(bindings1.get("name"), row1.get("ARTIST_NAME"));
        // to compare dates we need to create the binding correctly
View Full Code Here

Examples of org.apache.cayenne.access.MockOperationObserver.rowsForQuery()

        MockOperationObserver observer = new MockOperationObserver();
        SelectQuery query = new SelectQuery(Artist.class);
        getDomain().performQueries(Collections.singletonList(query), observer);

        List data = observer.rowsForQuery(query);
        assertEquals(expectedRowCount, data.size());
        Map row = (Map) data.get(0);
        return row;
    }
}
View Full Code Here

Examples of org.apache.cayenne.access.MockOperationObserver.rowsForQuery()

        }
        finally {
            c.close();
        }

        List<DataRow> rows = observer.rowsForQuery(template);
        assertNotNull(rows);
        assertEquals(1, rows.size());
        DataRow row = rows.get(0);

        // In the absence of ObjEntity most DB's return a Long here, except for Oracle
View Full Code Here

Examples of org.apache.cayenne.access.MockOperationObserver.rowsForQuery()

        }
        finally {
            c.close();
        }

        List<DataRow> rows = observer.rowsForQuery(template);
        assertNotNull(rows);
        assertEquals(1, rows.size());
        DataRow row = rows.get(0);

        assertNotNull(row.get("DOB"));
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.