public class UpdateCondition
extends java.lang.Object
implements java.io.Serializable
Specifies the conditions under which data should be updated. If an update condition is specified for a request, the data will only be updated if the condition is satisfied. For example, if an attribute with a specific name and value exists, or if a specific attribute doesn't exist.
Constructor and Description |
---|
UpdateCondition()
Default constructor for a new UpdateCondition object.
|
UpdateCondition(java.lang.String name,
java.lang.String value,
java.lang.Boolean exists)
Constructs a new UpdateCondition object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.Boolean |
getExists()
A value specifying whether or not the specified attribute must exist
with the specified value in order for the update condition to be
satisfied.
|
java.lang.String |
getName()
The name of the attribute involved in the condition.
|
java.lang.String |
getValue()
The value of an attribute.
|
int |
hashCode() |
java.lang.Boolean |
isExists()
A value specifying whether or not the specified attribute must exist
with the specified value in order for the update condition to be
satisfied.
|
void |
setExists(java.lang.Boolean exists)
A value specifying whether or not the specified attribute must exist
with the specified value in order for the update condition to be
satisfied.
|
void |
setName(java.lang.String name)
The name of the attribute involved in the condition.
|
void |
setValue(java.lang.String value)
The value of an attribute.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
UpdateCondition |
withExists(java.lang.Boolean exists)
A value specifying whether or not the specified attribute must exist
with the specified value in order for the update condition to be
satisfied.
|
UpdateCondition |
withName(java.lang.String name)
The name of the attribute involved in the condition.
|
UpdateCondition |
withValue(java.lang.String value)
The value of an attribute.
|
public UpdateCondition()
public UpdateCondition(java.lang.String name, java.lang.String value, java.lang.Boolean exists)
name
- The name of the attribute involved in the condition.value
- The value of an attribute. This value can only be
specified when the Exists
parameter is equal to
true
.exists
- A value specifying whether or not the specified
attribute must exist with the specified value in order for the update
condition to be satisfied. Specify true
if the attribute
must exist for the update condition to be satisfied. Specify
false
if the attribute should not exist in order for the
update condition to be satisfied.public java.lang.String getName()
public void setName(java.lang.String name)
name
- The name of the attribute involved in the condition.public UpdateCondition withName(java.lang.String name)
Returns a reference to this object so that method calls can be chained together.
name
- The name of the attribute involved in the condition.public java.lang.String getValue()
Exists
parameter is equal to true
.Exists
parameter is equal to true
.public void setValue(java.lang.String value)
Exists
parameter is equal to true
.value
- The value of an attribute. This value can only be specified when the
Exists
parameter is equal to true
.public UpdateCondition withValue(java.lang.String value)
Exists
parameter is equal to true
.
Returns a reference to this object so that method calls can be chained together.
value
- The value of an attribute. This value can only be specified when the
Exists
parameter is equal to true
.public java.lang.Boolean isExists()
true
if the attribute must exist for
the update condition to be satisfied. Specify false
if
the attribute should not exist in order for the update condition to be
satisfied.true
if the attribute must exist for
the update condition to be satisfied. Specify false
if
the attribute should not exist in order for the update condition to be
satisfied.public void setExists(java.lang.Boolean exists)
true
if the attribute must exist for
the update condition to be satisfied. Specify false
if
the attribute should not exist in order for the update condition to be
satisfied.exists
- A value specifying whether or not the specified attribute must exist
with the specified value in order for the update condition to be
satisfied. Specify true
if the attribute must exist for
the update condition to be satisfied. Specify false
if
the attribute should not exist in order for the update condition to be
satisfied.public UpdateCondition withExists(java.lang.Boolean exists)
true
if the attribute must exist for
the update condition to be satisfied. Specify false
if
the attribute should not exist in order for the update condition to be
satisfied.
Returns a reference to this object so that method calls can be chained together.
exists
- A value specifying whether or not the specified attribute must exist
with the specified value in order for the update condition to be
satisfied. Specify true
if the attribute must exist for
the update condition to be satisfied. Specify false
if
the attribute should not exist in order for the update condition to be
satisfied.public java.lang.Boolean getExists()
true
if the attribute must exist for
the update condition to be satisfied. Specify false
if
the attribute should not exist in order for the update condition to be
satisfied.true
if the attribute must exist for
the update condition to be satisfied. Specify false
if
the attribute should not exist in order for the update condition to be
satisfied.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.