public static PagedResults makeTable(ObjectStore os, Query query, List view) throws ObjectStoreException { Results r = os.execute(query); r.setBatchSize(BATCH_SIZE);   try { r.get(0); } catch (IndexOutOfBoundsException _) {    } catch (RuntimeException e) { if (e.getCause() instanceof ObjectStoreException) { throw (ObjectStoreException) e.getCause(); } else { throw e; } }  return new PagedResults(view, r);
public static PagedResults makeTable(ObjectStore os, Query query) throws ObjectStoreException { return new PagedResults(makeResults(os, query));
    public static PagedResults makeTable(ObjectStore os, Query query, List view)        throws ObjectStoreException {        Results r = os.execute(query);        r.setBatchSize(BATCH_SIZE);        // call this so that if an exception occurs we notice now rather than in the JSP code        try {            r.get(0);        } catch (IndexOutOfBoundsException _) {            // no results - ignore            // we don't call size() first to avoid this exception because that could be very slow            // on a large results set        } catch (RuntimeException e) {            if (e.getCause() instanceof ObjectStoreException) {                throw (ObjectStoreException) e.getCause();            } else {                throw e;            }        }        return new PagedResults(view, r);    }