// first grab all the info from the WaybackRequest, and validate it:
resultsPerPage = request.getResultsPerPage();
pageNum = request.getPageNum();
if (resultsPerPage < 1) {
throw new BadQueryException("resultsPerPage cannot be < 1");
}
if (resultsPerPage > index.getMaxRecords()) {
throw new BadQueryException("resultsPerPage cannot be > "
+ index.getMaxRecords());
}
if (pageNum < 1) {
throw new BadQueryException("pageNum must be > 0");
}
startResult = (pageNum - 1) * resultsPerPage;
startFilter = new WindowStartFilter<T>(startResult);
endFilter = new WindowEndFilter<T>(resultsPerPage);
windowFilters.addFilter(startFilter);