@Test public void testMatchesAllDocuments() { Query baseQuery = Query.atPath(ResourcePath.fromString("collection")); assertTrue(baseQuery.matchesAllDocuments()); Query query = baseQuery.orderBy(orderBy("__name__")); assertTrue(query.matchesAllDocuments()); query = baseQuery.orderBy(orderBy("foo")); assertFalse(query.matchesAllDocuments()); query = baseQuery.filter(filter("foo", "==", "bar")); assertFalse(query.matchesAllDocuments()); query = baseQuery.limitToFirst(1); assertFalse(query.matchesAllDocuments()); query = baseQuery.startAt(new Bound(Collections.emptyList(), true)); assertFalse(query.matchesAllDocuments()); query = baseQuery.endAt(new Bound(Collections.emptyList(), true)); assertFalse(query.matchesAllDocuments()); }
public boolean matchesAllDocuments() { return filters.isEmpty() && limit == Target.NO_LIMIT && startAt == null && endAt == null && (getExplicitOrderBy().isEmpty() || (getExplicitOrderBy().size() == 1 && getFirstOrderByField().isKeyField())); }
Query { public boolean matchesAllDocuments() { return filters.isEmpty() && limit == Target.NO_LIMIT && startAt == null && endAt == null && (getExplicitOrderBy().isEmpty() || (getExplicitOrderBy().size() == 1 && getFirstOrderByField().isKeyField())); } }
Query { public boolean matchesAllDocuments() { return filters.isEmpty() && limit == Target.NO_LIMIT && startAt == null && endAt == null && (getExplicitOrderBy().isEmpty() || (getExplicitOrderBy().size() == 1 && getFirstOrderByField().isKeyField())); } Query(
      ResourcePath path,
      @Nullable String collectionGroup,
      List<Filter> filters,
      List<OrderBy> explicitSortOrder,
      long limit,
      LimitType limitType,
      @Nullable Bound startAt,
      @Nullable Bound endAt);  Query(ResourcePath path, @Nullable String collectionGroup); }
Query { public boolean matchesAllDocuments() { return filters.isEmpty() && limit == Target.NO_LIMIT && startAt == null && endAt == null && (getExplicitOrderBy().isEmpty() || (getExplicitOrderBy().size() == 1 && getFirstOrderByField().isKeyField())); } Query(
      ResourcePath path,
      @Nullable String collectionGroup,
      List<Filter> filters,
      List<OrderBy> explicitSortOrder,
      long limit,
      LimitType limitType,
      @Nullable Bound startAt,
      @Nullable Bound endAt);  Query(ResourcePath path, @Nullable String collectionGroup); static Query atPath(ResourcePath path); ResourcePath getPath(); @Nullable String getCollectionGroup(); boolean isDocumentQuery(); boolean isCollectionGroupQuery(); boolean matchesAllDocuments(); List<Filter> getFilters(); long getLimitToFirst(); boolean hasLimitToFirst(); long getLimitToLast(); boolean hasLimitToLast(); LimitType getLimitType(); @Nullable Bound getStartAt(); @Nullable Bound getEndAt(); FieldPath getFirstOrderByField(); @Nullable FieldPath inequalityField(); @Nullable Operator findFilterOperator(List<Operator> operators); Query filter(Filter filter); Query orderBy(OrderBy order); Query limitToFirst(long limit); Query limitToLast(long limit); Query startAt(Bound bound); Query endAt(Bound bound); Query asCollectionQueryAtPath(ResourcePath path); List<OrderBy> getExplicitOrderBy(); List<OrderBy> getOrderBy(); boolean matches(Document doc); Comparator<Document> comparator(); Target toTarget(); String getCanonicalId(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
Query { public boolean matchesAllDocuments() { return filters.isEmpty() && limit == Target.NO_LIMIT && startAt == null && endAt == null && (getExplicitOrderBy().isEmpty() || (getExplicitOrderBy().size() == 1 && getFirstOrderByField().isKeyField())); } Query(
      ResourcePath path,
      @Nullable String collectionGroup,
      List<Filter> filters,
      List<OrderBy> explicitSortOrder,
      long limit,
      LimitType limitType,
      @Nullable Bound startAt,
      @Nullable Bound endAt);  Query(ResourcePath path, @Nullable String collectionGroup); static Query atPath(ResourcePath path); ResourcePath getPath(); @Nullable String getCollectionGroup(); boolean isDocumentQuery(); boolean isCollectionGroupQuery(); boolean matchesAllDocuments(); List<Filter> getFilters(); long getLimitToFirst(); boolean hasLimitToFirst(); long getLimitToLast(); boolean hasLimitToLast(); LimitType getLimitType(); @Nullable Bound getStartAt(); @Nullable Bound getEndAt(); FieldPath getFirstOrderByField(); @Nullable FieldPath inequalityField(); @Nullable Operator findFilterOperator(List<Operator> operators); Query filter(Filter filter); Query orderBy(OrderBy order); Query limitToFirst(long limit); Query limitToLast(long limit); Query startAt(Bound bound); Query endAt(Bound bound); Query asCollectionQueryAtPath(ResourcePath path); List<OrderBy> getExplicitOrderBy(); List<OrderBy> getOrderBy(); boolean matches(Document doc); Comparator<Document> comparator(); Target toTarget(); String getCanonicalId(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }