Interface ReadQuery

  • All Superinterfaces:
    Query
    All Known Subinterfaces:
    BooleanQuery, GraphQuery, SelectQuery

    public interface ReadQuery
    extends Query

    A read-only query over a semantic graph

    Since:
    1.0
    Version:
    1.0
    Author:
    Michael Grove
    • Field Detail

      • NO_OFFSET

        static final long NO_OFFSET
        Constant value used to specify that a query has no offset in its query results
        See Also:
        Constant Field Values
      • NO_LIMIT

        static final long NO_LIMIT
        Constant value used to specify that a query should not have any limit imposed on the number of results it returns.
        See Also:
        Constant Field Values
    • Method Detail

      • limit

        long limit()
        Return the current result limit for this query.
        Returns:
        the limit, or NO_LIMIT if the limit is not set
      • offset

        long offset()
        Return the current result offset for this query.
        Returns:
        the offset, or NO_OFFSET if the offset is not set
      • limit

        @Nonnull
        ReadQuery limit​(long theLimit)
        Set the maximum number of results that can be returned by this query. Setting the limit on this query will *override* any limit specified in the original query string, however, setting the limit to NO_LIMIT will *not* remove the limit if it is specified in the query, but you can use it to remove a limit that has already been set if there was not a limit specified in the query originally.
        Parameters:
        theLimit - the new limit
        Returns:
        this query
      • offset

        @Nonnull
        ReadQuery offset​(long theOffset)
        Set the offset of the query results. Similar to limit() this will override an offset in the query, and you can use NO_OFFSET to remove an offset specified on the query, but not in the query string.
        Parameters:
        theOffset - the offset
        Returns:
        this query