Class QuerySnapshot (3.28.0)

public class QuerySnapshot extends GenericQuerySnapshot<Query>

A QuerySnapshot contains the results of a query. It can contain zero or more DocumentSnapshot objects.

Inheritance

java.lang.Object > GenericQuerySnapshot > QuerySnapshot

Static Methods

withChanges(Query query, Timestamp readTime, DocumentSet documentSet, List<DocumentChange> documentChanges)

public static QuerySnapshot withChanges(Query query, Timestamp readTime, DocumentSet documentSet, List<DocumentChange> documentChanges)

Creates a new QuerySnapshot representing a snapshot of a Query with changed documents.

Parameters
Name Description
query Query
readTime com.google.cloud.Timestamp
documentSet com.google.cloud.firestore.DocumentSet
documentChanges List<DocumentChange>
Returns
Type Description
QuerySnapshot

withDocuments(Query query, Timestamp readTime, List<QueryDocumentSnapshot> documents)

public static QuerySnapshot withDocuments(Query query, Timestamp readTime, List<QueryDocumentSnapshot> documents)

Creates a new QuerySnapshot representing the results of a Query with added documents.

Parameters
Name Description
query Query
readTime com.google.cloud.Timestamp
documents List<QueryDocumentSnapshot>
Returns
Type Description
QuerySnapshot

Constructors

QuerySnapshot(Query query, Timestamp readTime)

protected QuerySnapshot(Query query, Timestamp readTime)
Parameters
Name Description
query Query
readTime com.google.cloud.Timestamp

QuerySnapshot(Query query, Timestamp readTime, List<QueryDocumentSnapshot> documents, List<DocumentChange> documentChanges)

protected QuerySnapshot(Query query, Timestamp readTime, List<QueryDocumentSnapshot> documents, List<DocumentChange> documentChanges)
Parameters
Name Description
query Query
readTime com.google.cloud.Timestamp
documents List<QueryDocumentSnapshot>
documentChanges List<DocumentChange>