Package com.google.cloud.firestore (3.2.0)

Classes

BasePath<B>

BasePath represents a path sequence in the Firestore database. It is composed of an ordered sequence of string segments.

Blob

Immutable class representing an array of bytes in Firestore.

BulkWriter

A Firestore BulkWriter that can be used to perform a large number of writes in parallel.

BulkWriterOptions

Options used to configure request throttling in BulkWriter.

BulkWriterOptions.Builder

CollectionGroup

A Collection Group query matches all documents that are contained in a collection or subcollection with a specific collection ID.

CollectionReference

A CollectionReference can be used for adding documents, getting document references, and querying for documents (using the methods inherited from Query).

Subclassing Note: Firestore classes are not meant to be subclassed except for use in test mocks. Subclassing is not supported in production code and new SDK releases may break code that does so.

DocumentChange

A DocumentChange represents a change to the documents matching a query. It contains the document affected and a the type of change that occurred (added, modifed, or removed).

DocumentReference

A DocumentReference refers to a document location in a Firestore database and can be used to write, read, or listen to the location. There may or may not exist a document at the referenced location. A DocumentReference can also be used to create a CollectionReference to a subcollection.

Subclassing Note: Firestore classes are not meant to be subclassed except for use in test mocks. Subclassing is not supported in production code and new SDK releases may break code that does so.

DocumentSnapshot

A DocumentSnapshot contains data read from a document in a Firestore database. The data can be extracted with the #getData() or #get(String) methods.

If the DocumentSnapshot points to a non-existing document, getData() and its corresponding methods will return null. You can always explicitly check for a document's existence by calling #exists().

Subclassing Note: Firestore classes are not meant to be subclassed except for use in test mocks. Subclassing is not supported in production code and new SDK releases may break code that does so.

FieldMask

A FieldMask can be used to limit the number of fields returned by a getAll() call.

FieldPath

A FieldPath refers to a field in a document. The path may consist of a single field name (referring to a top level field in the document), or a list of field names (referring to a nested field in the document).

FieldValue

Sentinel values that can be used when writing document fields with set() or update().

FirestoreBundle

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

FirestoreBundle.Builder

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

FirestoreOptions

A Factory class to create new Firestore instances.

FirestoreOptions.Builder

FirestoreOptions.DefaultFirestoreFactory

FirestoreOptions.DefaultFirestoreRpcFactory

FirestoreOptions.EmulatorCredentials

GeoPoint

Immutable class representing a geographic location in Firestore

Internal

Precondition

Preconditions that can be used to restrict update() calls.

Query

A Query which you can read or listen to. You can also construct refined Query objects by adding filters and ordering.

QueryDocumentSnapshot

A QueryDocumentSnapshot contains data read from a document in a Firestore database as part of a query. The document is guaranteed to exist and its data can be extracted using the #getData() or #get(String) methods.

QueryDocumentSnapshot offers the same API surface as DocumentSnapshot. Since query results contain only existing documents, the #exists() method will always return true and getData() will never be null.

Subclassing Note: Firestore classes are not meant to be subclassed except for use in test mocks. Subclassing is not supported in production code and new SDK releases may break code that does so.

QueryPartition

A split point that can be used in a query as a starting and/or end point for the query results. The cursors returned by #getStartAt() and #getEndBefore() can only be used in a query that matches the constraint of query that produced this partition.

QuerySnapshot

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

RecursiveDelete

Class used to store state required for running a recursive delete operation. Each recursive delete call should use a new instance of the class.

SetOptions

An options object that configures the behavior of set() calls. By providing one of the SetOptions objects returned by #merge, #mergeFields and #mergeFieldPaths, the set() calls in DocumentReference, WriteBatch and Transaction can be configured to perform granular merges instead of overwriting the target documents in their entirety.

Transaction

A Transaction is passed to a Function to provide the methods to read and write data within the transaction context. See Also: Firestore#runTransaction(Function)

TransactionOptions

Options specifying the behavior of Firestore Transactions.

A transaction in Firestore can be either read-write or read-only.

The default set of options is a read-write transaction with a maximum number of 5 attempts. This attempt count can be customized via the ReadWriteOptionsBuilder#setNumberOfAttempts(int) method. A new instance of a builder can be created by calling #createReadWriteOptionsBuilder().

A read-only transaction can be configured via the ReadOnlyOptionsBuilder class. A new instance can be created by calling #createReadOnlyOptionsBuilder(). See Also: com.google.firestore.v1.TransactionOptions

TransactionOptions.Builder<B>

TransactionOptions.ReadOnlyOptionsBuilder

A typesafe builder class representing those options that are applicable when configuring a transaction to be read-only. All methods function as "set" rather than returning a new copy with a value set on it.

TransactionOptions.ReadWriteOptionsBuilder

A typesafe builder class representing those options that are applicable when configuring a transaction to be read-write. All methods function as "set" rather than returning a new copy with a value set on it. By default, a read-write transaction will be attempted a max of 5 times.

UpdateBuilder<T>

Abstract class that collects and bundles all write operations for Transaction and WriteBatch.

WriteBatch

A Firestore WriteBatch that can be used to atomically commit multiple write operations at once. See Also: Firestore#batch()

WriteResult

A WriteResult exposes the update time set by the server.

Interfaces

BulkWriter.WriteErrorCallback

A callback set by addWriteErrorListener() to be run every time an operation fails and determines if an operation should be retried.

BulkWriter.WriteResultCallback

A callback set by addWriteResultListener() to be run every time an operation successfully completes.

EventListener<T>

An interface for event listeners.

Firestore

Represents a Firestore Database and is the entry point for all Firestore operations

FirestoreFactory

An interface for Firestore factories.

FirestoreRpcFactory

An interface for Firestore RPC factory. Implementation will be loaded via java.util.ServiceLoader.

ListenerRegistration

Represents a listener that can be removed by calling remove().

Transaction.AsyncFunction<T>

User callback that takes a Firestore Async Transaction.

Transaction.Function<T>

User callback that takes a Firestore Transaction.

Enums

DocumentChange.Type

An enumeration of snapshot diff types.

Query.Direction

The direction of a sort.

TransactionOptions.TransactionOptionsType

Exceptions

BulkWriterException

The error thrown when a BulkWriter operation fails.

FirestoreException

A Firestore Service exception.