@Override public String getString(int row, int field) { return get(String.class, row, field); }
private ResultPage fetchInitialPageIfNecessary() throws BrowseException { ResultPage result = null; if (! initialized) { DataResponse resp = initialPageCallback.fetchPage(); cookie = resp.getCookie(); if (resp.getEstimatedCount()>=0) { this.count = resp.getEstimatedCount(); } initialized = true; result = new ResultPageImpl(resp.getPage()); } return result; }
/** * Fetches a specified page of at most <code>limit</code> results from the browser. * * @param dir specifies which data to fetch * @param limit the maximum number of tuples to fetch * @param skip the number of tuples to skip before fetching results * @throws NoSuchRelationException if the relation is no longer present in the browser * @throws InvalidCookieException if the browser does not recognize the query, * eg. if it expires old queries */ private ResultPage fetch(Page dir, int skip) throws BrowseException { ResultPage result = fetchInitialPageIfNecessary(); if (result==null || !initialPageMatchesFetchRequest(dir, skip)) { DataResponse resp = browser.fetch(new FetchRequest(cookie, dir, pageSize, skip)); checkOther(check(check(resp, InvalidCookieException.class), NoSuchRelationException.class)); if (resp.getEstimatedCount()>=0) { this.count = resp.getEstimatedCount(); } this.cookie = resp.getCookie(); result = new ResultPageImpl(resp.getPage()); } return result; }