public class UpdateCondition
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
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.
Modifier and Type | Field and Description |
---|---|
private 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.
|
private java.lang.String |
name
The name of the attribute involved in the condition.
|
private java.lang.String |
value
The value of an attribute.
|
Constructor and Description |
---|
UpdateCondition()
Default constructor for 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 |
---|---|
UpdateCondition |
clone() |
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.
|
private java.lang.String name
The name of the attribute involved in the condition.
private java.lang.String value
The value of an attribute. This value can only be specified when the
Exists
parameter is equal to true
.
private 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.
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()
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 void setName(java.lang.String name)
The name of the attribute involved in the condition.
name
- The name of the attribute involved in the condition.public java.lang.String getName()
The name of the attribute involved in the condition.
public UpdateCondition withName(java.lang.String name)
The name of the attribute involved in the condition.
name
- The name of the attribute involved in the condition.public void setValue(java.lang.String value)
The value of an attribute. This value can only be specified when the
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 java.lang.String getValue()
The value of an attribute. This value can only be specified when the
Exists
parameter is equal to true
.
Exists
parameter is equal to true
.public UpdateCondition withValue(java.lang.String value)
The value of an attribute. This value can only be specified when the
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 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.
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.
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()
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.
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)
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.
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 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.
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.
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 boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public UpdateCondition clone()
clone
in class java.lang.Object