Package com.google.cloud.firestore
Class QuerySnapshot
- All Implemented Interfaces:
Iterable<QueryDocumentSnapshot>
A QuerySnapshot contains the results of a query. It can contain zero or more DocumentSnapshot
objects.
-
Field Summary
Fields inherited from class com.google.cloud.firestore.GenericQuerySnapshot
query, readTime -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedQuerySnapshot(Query query, com.google.cloud.Timestamp readTime) protectedQuerySnapshot(Query query, com.google.cloud.Timestamp readTime, List<QueryDocumentSnapshot> documents, List<DocumentChange> documentChanges) -
Method Summary
Modifier and TypeMethodDescriptionstatic QuerySnapshotwithChanges(Query query, com.google.cloud.Timestamp readTime, com.google.cloud.firestore.DocumentSet documentSet, List<DocumentChange> documentChanges) Creates a new QuerySnapshot representing a snapshot of a Query with changed documents.static QuerySnapshotwithDocuments(Query query, com.google.cloud.Timestamp readTime, List<QueryDocumentSnapshot> documents) Creates a new QuerySnapshot representing the results of a Query with added documents.Methods inherited from class com.google.cloud.firestore.GenericQuerySnapshot
equals, getDocumentChanges, getDocuments, getQuery, getReadTime, hashCode, isEmpty, iterator, size, toObjectsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
QuerySnapshot
-
QuerySnapshot
protected QuerySnapshot(Query query, com.google.cloud.Timestamp readTime, List<QueryDocumentSnapshot> documents, List<DocumentChange> documentChanges)
-
-
Method Details
-
withDocuments
public static QuerySnapshot withDocuments(Query query, com.google.cloud.Timestamp readTime, List<QueryDocumentSnapshot> documents) Creates a new QuerySnapshot representing the results of a Query with added documents. -
withChanges
public static QuerySnapshot withChanges(Query query, com.google.cloud.Timestamp readTime, com.google.cloud.firestore.DocumentSet documentSet, List<DocumentChange> documentChanges) Creates a new QuerySnapshot representing a snapshot of a Query with changed documents.
-