assertNull(dao.findForeignFieldType(Void.class));
assertEquals(1, dao.countOf());
assertEquals(1, dao.countOf(dao.queryBuilder().setCountOf(true).prepare()));
PreparedQuery<Foo> prepared = dao.queryBuilder().prepare();
DatabaseConnection conn = connectionSource.getReadOnlyConnection();
CompiledStatement compiled = null;
try {
compiled = prepared.compile(conn, StatementType.SELECT);
DatabaseResults results = compiled.runQuery(null);
assertTrue(results.next());
Foo result = dao.mapSelectStarRow(results);
assertEquals(foo.id, result.id);
GenericRowMapper<Foo> mapper = dao.getSelectStarRowMapper();
result = mapper.mapRow(results);
assertEquals(foo.id, result.id);
} finally {
if (compiled != null) {
compiled.close();
}
connectionSource.releaseConnection(conn);
}
assertTrue(dao.idExists(foo.id));
Foo result = dao.queryForFirst(prepared);