private Object retrieveInstance(ExtObjectContainer client) { Query query = client.query(); query.constrain(_class); query.descend("_isRoot").constrain(new Boolean(true)); return query.execute().next(); }
private void assertNoItemFoundByQuery() { Query q = db().query(); q.constrain(Item.class); Assert.areEqual(0, q.execute().size()); }
private void asserItemCount(final int expectedCount) { Query query = db().query(); query.constrain(Item.class); int itemCount = query.execute().size(); Assert.areEqual(expectedCount, itemCount); }