Package | Description |
---|---|
com.google.cloud.firestore |
Modifier and Type | Method and Description |
---|---|
DocumentReference |
CollectionReference.document()
Returns a DocumentReference pointing to a new document with an auto-generated ID within this
collection.
|
DocumentReference |
CollectionReference.document(String childPath)
Gets a DocumentReference instance that refers to the document that is a child of this
Collection.
|
DocumentReference |
Firestore.document(String path)
Gets a
DocumentReference that refers to the document at the specified path. |
DocumentReference |
CollectionReference.getParent()
Returns a DocumentReference to the containing Document if this is a subcollection, else null.
|
DocumentReference |
DocumentSnapshot.getReference()
Gets the reference to the document.
|
Modifier and Type | Method and Description |
---|---|
com.google.api.core.ApiFuture<DocumentReference> |
CollectionReference.add(Map<String,Object> fields)
Adds a new document to this collection with the specified data, assigning it a document ID
automatically.
|
com.google.api.core.ApiFuture<DocumentReference> |
CollectionReference.add(Object pojo)
Adds a new document to this collection with the specified POJO as contents, assigning it a
document ID automatically.
|
Iterable<DocumentReference> |
CollectionReference.listDocuments()
Retrieves the list of documents in this collection.
|
Modifier and Type | Method and Description |
---|---|
T |
UpdateBuilder.create(DocumentReference documentReference,
Map<String,Object> fields)
Creates a new Document at the DocumentReference's location.
|
T |
UpdateBuilder.create(DocumentReference documentReference,
Object pojo)
Creates a new Document at the DocumentReference location.
|
T |
UpdateBuilder.delete(DocumentReference documentReference)
Deletes the document referred to by this DocumentReference.
|
T |
UpdateBuilder.delete(DocumentReference documentReference,
Precondition precondition)
Deletes the document referred to by this DocumentReference.
|
com.google.api.core.ApiFuture<DocumentSnapshot> |
Transaction.get(DocumentReference documentRef)
Reads the document referred to by the provided DocumentReference.
|
com.google.api.core.ApiFuture<List<DocumentSnapshot>> |
Firestore.getAll(DocumentReference... documentReferences)
Retrieves multiple documents from Firestore.
|
com.google.api.core.ApiFuture<List<DocumentSnapshot>> |
Transaction.getAll(DocumentReference... documentReferences)
Retrieves multiple documents from Firestore.
|
com.google.api.core.ApiFuture<List<DocumentSnapshot>> |
Firestore.getAll(DocumentReference[] documentReferences,
FieldMask fieldMask)
Retrieves multiple documents from Firestore, while optionally applying a field mask to reduce
the amount of data transmitted.
|
com.google.api.core.ApiFuture<List<DocumentSnapshot>> |
Transaction.getAll(DocumentReference[] documentReferences,
FieldMask fieldMask)
Retrieves multiple documents from Firestore, while optionally applying a field mask to reduce
the amount of data transmitted from the backend.
|
void |
Firestore.getAll(DocumentReference[] documentReferences,
FieldMask fieldMask,
com.google.api.gax.rpc.ApiStreamObserver<DocumentSnapshot> responseObserver)
Retrieves multiple documents from Firestore while optionally applying a field mask to reduce
the amount of data transmitted.
|
T |
UpdateBuilder.set(DocumentReference documentReference,
Map<String,Object> fields)
Overwrites the document referred to by this DocumentReference.
|
T |
UpdateBuilder.set(DocumentReference documentReference,
Map<String,Object> fields,
SetOptions options)
Overwrites the document referred to by this DocumentReference.
|
T |
UpdateBuilder.set(DocumentReference documentReference,
Object pojo)
Overwrites the document referred to by this DocumentReference.
|
T |
UpdateBuilder.set(DocumentReference documentReference,
Object pojo,
SetOptions options)
Overwrites the document referred to by this DocumentReference.
|
T |
UpdateBuilder.update(DocumentReference documentReference,
FieldPath fieldPath,
Object value,
Object... moreFieldsAndValues)
Updates the fields in the document referred to by this DocumentReference.
|
T |
UpdateBuilder.update(DocumentReference documentReference,
Map<String,Object> fields)
Updates fields in the document referred to by this DocumentReference.
|
T |
UpdateBuilder.update(DocumentReference documentReference,
Map<String,Object> fields,
Precondition options)
Updates fields in the document referred to by this DocumentReference.
|
T |
UpdateBuilder.update(DocumentReference documentReference,
Precondition options,
FieldPath fieldPath,
Object value,
Object... moreFieldsAndValues)
Updates the fields in the document referred to by this DocumentReference.
|
T |
UpdateBuilder.update(DocumentReference documentReference,
Precondition options,
String field,
Object value,
Object... moreFieldsAndValues)
Updates the fields in the document referred to by this DocumentReference.
|
T |
UpdateBuilder.update(DocumentReference documentReference,
String field,
Object value,
Object... moreFieldsAndValues)
Updates the fields in the document referred to by this DocumentReference.
|
Constructor and Description |
---|
DocumentSnapshot(com.google.cloud.firestore.FirestoreImpl firestore,
DocumentReference docRef,
Map<String,Value> fields,
com.google.cloud.Timestamp readTime,
com.google.cloud.Timestamp updateTime,
com.google.cloud.Timestamp createTime) |
QueryDocumentSnapshot(com.google.cloud.firestore.FirestoreImpl firestore,
DocumentReference docRef,
Map<String,Value> fields,
com.google.cloud.Timestamp readTime,
com.google.cloud.Timestamp updateTime,
com.google.cloud.Timestamp createTime) |
Copyright © 2019 Google LLC. All rights reserved.