Class QueryResult<T>

java.lang.Object
com.google.gerrit.index.query.QueryResult<T>

public abstract class QueryResult<T> extends Object
Results of a query over entities.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> QueryResult<T>
    create(String query, Predicate<T> predicate, int limit, List<T> entities)
     
    abstract com.google.common.collect.ImmutableList<T>
    Returns the query results.
    abstract boolean
    Returns whether the query could be retried with a higher start/limit to produce more results.
    abstract Predicate<T>
    Returns the predicate after all rewriting and other modification by the query subsystem.
    abstract String
    Returns the original query string, or null if the query was created programmatically.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • QueryResult

      public QueryResult()
  • Method Details

    • create

      public static <T> QueryResult<T> create(String query, Predicate<T> predicate, int limit, List<T> entities)
    • query

      public abstract String query()
      Returns the original query string, or null if the query was created programmatically.
    • predicate

      public abstract Predicate<T> predicate()
      Returns the predicate after all rewriting and other modification by the query subsystem.
    • entities

      public abstract com.google.common.collect.ImmutableList<T> entities()
      Returns the query results.
    • more

      public abstract boolean more()
      Returns whether the query could be retried with a higher start/limit to produce more results. Never true if entities() is empty.