public final class Precondition
Preconditions that can be used to restrict update() calls.
Static Fields
NONE
public static final Precondition NONE
An empty Precondition that adds no enforcements
Field Value | |
---|---|
Type | Description |
Precondition |
Static Methods
updatedAt(Timestamp updateTime)
public static Precondition updatedAt(Timestamp updateTime)
Creates a Precondition that enforces that the existing document was written at the specified time.
Parameter | |
---|---|
Name | Description |
updateTime | com.google.cloud.Timestamp The write time to enforce on the existing document. |
Returns | |
---|---|
Type | Description |
Precondition | A new Precondition |
Methods
equals(Object obj)
public boolean equals(Object obj)
Returns true if this Precondition is equal to the provided object.
Parameter | |
---|---|
Name | Description |
obj | Object The object to compare against. |
Returns | |
---|---|
Type | Description |
boolean | Whether this Precondition is equal to the provided object. |
hashCode()
public int hashCode()
Returns | |
---|---|
Type | Description |
int |