Examples of BadQueryException


Examples of org.archive.wayback.exception.BadQueryException

    // 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);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.