public abstract class UpdateBuilder<T extends UpdateBuilder> extends Object
Transaction
and WriteBatch
.Modifier and Type | Method and Description |
---|---|
T |
create(DocumentReference documentReference,
Map<String,Object> fields)
Creates a new Document at the DocumentReference's location.
|
T |
create(DocumentReference documentReference,
Object pojo)
Creates a new Document at the DocumentReference location.
|
T |
delete(DocumentReference documentReference)
Deletes the document referred to by this DocumentReference.
|
T |
delete(DocumentReference documentReference,
Precondition precondition)
Deletes the document referred to by this DocumentReference.
|
int |
getMutationsSize()
Get the number of mutations.
|
T |
set(DocumentReference documentReference,
Map<String,Object> fields)
Overwrites the document referred to by this DocumentReference.
|
T |
set(DocumentReference documentReference,
Map<String,Object> fields,
SetOptions options)
Overwrites the document referred to by this DocumentReference.
|
T |
set(DocumentReference documentReference,
Object pojo)
Overwrites the document referred to by this DocumentReference.
|
T |
set(DocumentReference documentReference,
Object pojo,
SetOptions options)
Overwrites the document referred to by this DocumentReference.
|
T |
update(DocumentReference documentReference,
FieldPath fieldPath,
Object value,
Object... moreFieldsAndValues)
Updates the fields in the document referred to by this DocumentReference.
|
T |
update(DocumentReference documentReference,
Map<String,Object> fields)
Updates fields in the document referred to by this DocumentReference.
|
T |
update(DocumentReference documentReference,
Map<String,Object> fields,
Precondition options)
Updates fields in the document referred to by this DocumentReference.
|
T |
update(DocumentReference documentReference,
Precondition options,
FieldPath fieldPath,
Object value,
Object... moreFieldsAndValues)
Updates the fields in the document referred to by this DocumentReference.
|
T |
update(DocumentReference documentReference,
Precondition options,
String field,
Object value,
Object... moreFieldsAndValues)
Updates the fields in the document referred to by this DocumentReference.
|
T |
update(DocumentReference documentReference,
String field,
Object value,
Object... moreFieldsAndValues)
Updates the fields in the document referred to by this DocumentReference.
|
@Nonnull public T create(@Nonnull DocumentReference documentReference, @Nonnull Map<String,Object> fields)
documentReference
- The DocumentReference to create.fields
- A map of the fields and values for the document.@Nonnull public T create(@Nonnull DocumentReference documentReference, @Nonnull Object pojo)
documentReference
- The DocumentReference to create.pojo
- A map of the fields and values for the document.@Nonnull public T set(@Nonnull DocumentReference documentReference, @Nonnull Map<String,Object> fields)
documentReference
- The DocumentReference to overwrite.fields
- A map of the field paths and values for the document.@Nonnull public T set(@Nonnull DocumentReference documentReference, @Nonnull Map<String,Object> fields, @Nonnull SetOptions options)
SetOptions
, the provided data can be merged into
an existing document.documentReference
- The DocumentReference to overwrite.fields
- A map of the field paths and values for the document.options
- An object to configure the set behavior.@Nonnull public T set(@Nonnull DocumentReference documentReference, @Nonnull Object pojo)
documentReference
- The DocumentReference to overwrite.pojo
- The POJO that will be used to populate the document contents.@Nonnull public T set(@Nonnull DocumentReference documentReference, @Nonnull Object pojo, @Nonnull SetOptions options)
SetOptions
, the provided data can be merged into
an existing document.documentReference
- The DocumentReference to overwrite.pojo
- The POJO that will be used to populate the document contents.options
- An object to configure the set behavior.@Nonnull public T update(@Nonnull DocumentReference documentReference, @Nonnull Map<String,Object> fields)
documentReference
- The DocumentReference to update.fields
- A Map containing the fields and values with which to update the document.@Nonnull public T update(@Nonnull DocumentReference documentReference, @Nonnull Map<String,Object> fields, Precondition options)
documentReference
- The DocumentReference to update.fields
- A Map containing the fields and values with which to update the document.options
- Preconditions to enforce on this update.@Nonnull public T update(@Nonnull DocumentReference documentReference, @Nonnull String field, @Nullable Object value, Object... moreFieldsAndValues)
documentReference
- The DocumentReference to update.field
- The first field to set.value
- The first value to set.moreFieldsAndValues
- String and Object pairs with more fields to be set.@Nonnull public T update(@Nonnull DocumentReference documentReference, @Nonnull FieldPath fieldPath, @Nullable Object value, Object... moreFieldsAndValues)
documentReference
- The DocumentReference to update.fieldPath
- The first field to set.value
- The first value to set.moreFieldsAndValues
- String and Object pairs with more fields to be set.@Nonnull public T update(@Nonnull DocumentReference documentReference, @Nonnull Precondition options, @Nonnull String field, @Nullable Object value, Object... moreFieldsAndValues)
documentReference
- The DocumentReference to update.options
- Preconditions to enforce on this update.field
- The first field to set.value
- The first value to set.moreFieldsAndValues
- String and Object pairs with more fields to be set.@Nonnull public T update(@Nonnull DocumentReference documentReference, @Nonnull Precondition options, @Nonnull FieldPath fieldPath, @Nullable Object value, Object... moreFieldsAndValues)
documentReference
- The DocumentReference to update.options
- Preconditions to enforce on this update.fieldPath
- The first field to set.value
- The first value to set.moreFieldsAndValues
- String and Object pairs with more fields to be set.@Nonnull public T delete(@Nonnull DocumentReference documentReference, @Nonnull Precondition precondition)
documentReference
- The DocumentReference to delete.precondition
- Precondition for the delete operation.@Nonnull public T delete(@Nonnull DocumentReference documentReference)
documentReference
- The DocumentReference to delete.public int getMutationsSize()
Copyright © 2019 Google LLC. All rights reserved.