Interface Query

All Superinterfaces:
org.geotools.api.filter.Filter

public interface Query extends org.geotools.api.filter.Filter
A Query contains the basic aspects of executing a search. A Query extends Filter to provide access to the underlying tree of criteria, selection, sorting, and projections.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     

    Fields inherited from interface org.geotools.api.filter.Filter

    EXCLUDE, INCLUDE
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The page size represents the maximum amount of results the query will return.
    org.geotools.api.filter.sort.SortBy
    The sortBy determines how the results will be sorted.
    int
    Get the offset where the query results will begin.
    long
    The timeout is specified in milliseconds.
    boolean
    Determines whether the total number of results should be returned

    Methods inherited from interface org.geotools.api.filter.Filter

    accept, evaluate
  • Field Details

    • DEFAULT_MAXIMUM_RETURNED_RESULTS

      static final int DEFAULT_MAXIMUM_RETURNED_RESULTS
      See Also:
  • Method Details

    • getStartIndex

      int getStartIndex()
      Get the offset where the query results will begin.

      Start index is required to be 1-based. For example if the query specifies a start index of 5 then the query results will start with the 5th result discovered by the query.

      If a value less than 1 is returned, Source implementations will throw UnsupportedQueryException.

      Returns:
      int - the start index for the query results
    • getPageSize

      int getPageSize()
      The page size represents the maximum amount of results the query will return. Page sizes of less than 1 (0 or a negative number) should return the maximum number of results supported by the catalog or the maximum supported by each Source, whichever is smaller.
      Returns:
      the page size - the maximum result size
    • getSortBy

      org.geotools.api.filter.sort.SortBy getSortBy()
      The sortBy determines how the results will be sorted.
      Returns:
      SortBy. Null if no sortBy is specified.
      See Also:
      • SortBy
    • requestsTotalResultsCount

      boolean requestsTotalResultsCount()
      Determines whether the total number of results should be returned
      Returns:
      true, if the count should be returned
    • getTimeoutMillis

      long getTimeoutMillis()
      The timeout is specified in milliseconds. This will cause the query to timeout and return results by the specified timeout, if the query has not done so already.
      Return 0 if no timeout should occur.
      Returns:
      max time to wait for query results in milliseconds, 0 if no timeout should occur.