Class QueryService.QueryResult

  • Enclosing class:
    QueryService

    public static final class QueryService.QueryResult
    extends Object
    The outcome of one query run - the source text, its parsed and planned forms, the matches, timing, and either a completion flag or a parse error message.
    • Method Detail

      • query

        public Query query()
        Returns:
        the parsed query, or null if parsing failed
      • results

        public List<QueryMatch> results()
        Returns:
        the matches, or null if parsing failed
      • executionTimeMs

        public long executionTimeMs()
        Returns:
        the elapsed wall-clock time in milliseconds
      • completed

        public boolean completed()
        Returns:
        true if the run finished without being cancelled
      • error

        public String error()
        Returns:
        the parse error message, or null if there was none
      • hasError

        public boolean hasError()
        Returns:
        true if the run failed to parse
      • resultCount

        public int resultCount()
        Returns:
        the number of matches, 0 when there are none
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object