Class FirestoreBundle.Builder (3.27.2)

public static final class FirestoreBundle.Builder

Builds a Firestore data bundle with results from the given document and query snapshots.

Inheritance

java.lang.Object > FirestoreBundle.Builder

Methods

add(DocumentSnapshot documentSnapshot)

public FirestoreBundle.Builder add(DocumentSnapshot documentSnapshot)

Adds a Firestore document snapshot to the bundle. Both the document data and the document read time will be included in the bundle.

Parameter
Name Description
documentSnapshot DocumentSnapshot

A document snapshot to add.

Returns
Type Description
FirestoreBundle.Builder

This instance.

add(String queryName, QuerySnapshot querySnap)

public FirestoreBundle.Builder add(String queryName, QuerySnapshot querySnap)

Adds a Firestore query snapshot to the bundle. Both the documents in the query snapshot and the query read time will be included in the bundle.

Parameters
Name Description
queryName String

The name of the query to add.

querySnap QuerySnapshot

The query snapshot to add.

Returns
Type Description
FirestoreBundle.Builder

This instance.

build()

public FirestoreBundle build()
Returns
Type Description
FirestoreBundle

getId()

public String getId()

Returns the ID for this bundle.

Returns
Type Description
String