Class UpdateCondition
- java.lang.Object
-
- com.amazonaws.services.simpledb.model.UpdateCondition
-
- All Implemented Interfaces:
Serializable,Cloneable
public class UpdateCondition extends Object implements Serializable, 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.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UpdateCondition()Default constructor for UpdateCondition object.UpdateCondition(String name, String value, Boolean exists)Constructs a new UpdateCondition object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UpdateConditionclone()booleanequals(Object obj)BooleangetExists()A value specifying whether or not the specified attribute must exist with the specified value in order for the update condition to be satisfied.StringgetName()The name of the attribute involved in the condition.StringgetValue()The value of an attribute.inthashCode()BooleanisExists()A value specifying whether or not the specified attribute must exist with the specified value in order for the update condition to be satisfied.voidsetExists(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.voidsetName(String name)The name of the attribute involved in the condition.voidsetValue(String value)The value of an attribute.StringtoString()Returns a string representation of this object; useful for testing and debugging.UpdateConditionwithExists(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.UpdateConditionwithName(String name)The name of the attribute involved in the condition.UpdateConditionwithValue(String value)The value of an attribute.
-
-
-
Constructor Detail
-
UpdateCondition
public UpdateCondition()
Default constructor for UpdateCondition object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
-
UpdateCondition
public UpdateCondition(String name, String value, Boolean exists)
Constructs a new UpdateCondition object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- Parameters:
name- The name of the attribute involved in the condition.value- The value of an attribute. This value can only be specified when theExistsparameter is equal totrue.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. Specifytrueif the attribute must exist for the update condition to be satisfied. Specifyfalseif the attribute should not exist in order for the update condition to be satisfied.
-
-
Method Detail
-
setName
public void setName(String name)
The name of the attribute involved in the condition.
- Parameters:
name- The name of the attribute involved in the condition.
-
getName
public String getName()
The name of the attribute involved in the condition.
- Returns:
- The name of the attribute involved in the condition.
-
withName
public UpdateCondition withName(String name)
The name of the attribute involved in the condition.
- Parameters:
name- The name of the attribute involved in the condition.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setValue
public void setValue(String value)
The value of an attribute. This value can only be specified when the
Existsparameter is equal totrue.- Parameters:
value- The value of an attribute. This value can only be specified when theExistsparameter is equal totrue.
-
getValue
public String getValue()
The value of an attribute. This value can only be specified when the
Existsparameter is equal totrue.- Returns:
- The value of an attribute. This value can only be specified when
the
Existsparameter is equal totrue.
-
withValue
public UpdateCondition withValue(String value)
The value of an attribute. This value can only be specified when the
Existsparameter is equal totrue.- Parameters:
value- The value of an attribute. This value can only be specified when theExistsparameter is equal totrue.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setExists
public void setExists(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
trueif the attribute must exist for the update condition to be satisfied. Specifyfalseif the attribute should not exist in order for the update condition to be satisfied.- Parameters:
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. Specifytrueif the attribute must exist for the update condition to be satisfied. Specifyfalseif the attribute should not exist in order for the update condition to be satisfied.
-
getExists
public 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
trueif the attribute must exist for the update condition to be satisfied. Specifyfalseif the attribute should not exist in order for the update condition to be satisfied.- Returns:
- 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
trueif the attribute must exist for the update condition to be satisfied. Specifyfalseif the attribute should not exist in order for the update condition to be satisfied.
-
withExists
public UpdateCondition withExists(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
trueif the attribute must exist for the update condition to be satisfied. Specifyfalseif the attribute should not exist in order for the update condition to be satisfied.- Parameters:
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. Specifytrueif the attribute must exist for the update condition to be satisfied. Specifyfalseif the attribute should not exist in order for the update condition to be satisfied.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isExists
public 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
trueif the attribute must exist for the update condition to be satisfied. Specifyfalseif the attribute should not exist in order for the update condition to be satisfied.- Returns:
- 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
trueif the attribute must exist for the update condition to be satisfied. Specifyfalseif the attribute should not exist in order for the update condition to be satisfied.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public UpdateCondition clone()
-
-