Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.simpledb.model;
 
 
Container for the parameters to the DeleteAttributes operation.

Deletes one or more attributes associated with an item. If all attributes of the item are deleted, the item is deleted.

NOTE: If DeleteAttributes is called without being passed any attributes or values specified, all the attributes for the item are deleted.

DeleteAttributes is an idempotent operation; running it multiple times on the same item or attribute does not result in an error response.

Because Amazon SimpleDB makes multiple copies of item data and uses an eventual consistency update model, performing a GetAttributes or Select operation (read) immediately after a DeleteAttributes or PutAttributes operation (write) might not return updated item data.

 
 public class DeleteAttributesRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The name of the domain in which to perform the operation.
 
     private String domainName;

    
The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.
 
     private String itemName;

    
A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.
 
The update condition which, if specified, determines whether the specified attributes will be deleted or not. The update condition must be satisfied in order for this request to be processed and the attributes to be deleted.
 
     private UpdateCondition expected;

    
Default constructor for a new DeleteAttributesRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
 
     public DeleteAttributesRequest() {}
    
    
Constructs a new DeleteAttributesRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
domainName The name of the domain in which to perform the operation.
itemName The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.
 
     public DeleteAttributesRequest(String domainNameString itemName) {
         setDomainName(domainName);
         setItemName(itemName);
     }

    
Constructs a new DeleteAttributesRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
domainName The name of the domain in which to perform the operation.
itemName The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.
attributes A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.
    public DeleteAttributesRequest(String domainNameString itemNamejava.util.List<Attributeattributes) {
        setDomainName(domainName);
        setItemName(itemName);
        setAttributes(attributes);
    }

    
Constructs a new DeleteAttributesRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
domainName The name of the domain in which to perform the operation.
itemName The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.
attributes A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.
expected The update condition which, if specified, determines whether the specified attributes will be deleted or not. The update condition must be satisfied in order for this request to be processed and the attributes to be deleted.
    public DeleteAttributesRequest(String domainNameString itemNamejava.util.List<AttributeattributesUpdateCondition expected) {
        setDomainName(domainName);
        setItemName(itemName);
        setAttributes(attributes);
        setExpected(expected);
    }

    
The name of the domain in which to perform the operation.

Returns:
The name of the domain in which to perform the operation.
    public String getDomainName() {
        return ;
    }
    
    
The name of the domain in which to perform the operation.

Parameters:
domainName The name of the domain in which to perform the operation.
    public void setDomainName(String domainName) {
        this. = domainName;
    }
    
    
The name of the domain in which to perform the operation.

Returns a reference to this object so that method calls can be chained together.

Parameters:
domainName The name of the domain in which to perform the operation.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DeleteAttributesRequest withDomainName(String domainName) {
        this. = domainName;
        return this;
    }

    
The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.

Returns:
The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.
    public String getItemName() {
        return ;
    }
    
    
The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.

Parameters:
itemName The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.
    public void setItemName(String itemName) {
        this. = itemName;
    }
    
    
The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.

Returns a reference to this object so that method calls can be chained together.

Parameters:
itemName The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DeleteAttributesRequest withItemName(String itemName) {
        this. = itemName;
        return this;
    }

    
A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.

Returns:
A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.
    public java.util.List<AttributegetAttributes() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<Attribute>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.

Parameters:
attributes A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.
    public void setAttributes(java.util.Collection<Attributeattributes) {
        if (attributes == null) {
            this. = null;
            return;
        }
        attributesCopy.addAll(attributes);
        this. = attributesCopy;
    }
    
    
A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.

Returns a reference to this object so that method calls can be chained together.

Parameters:
attributes A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DeleteAttributesRequest withAttributes(Attribute... attributes) {
        if (getAttributes() == nullsetAttributes(new java.util.ArrayList<Attribute>(attributes.length));
        for (Attribute value : attributes) {
            getAttributes().add(value);
        }
        return this;
    }
    
    
A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.

Returns a reference to this object so that method calls can be chained together.

Parameters:
attributes A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (attributes == null) {
            this. = null;
        } else {
            attributesCopy.addAll(attributes);
            this. = attributesCopy;
        }
        return this;
    }

    
The update condition which, if specified, determines whether the specified attributes will be deleted or not. The update condition must be satisfied in order for this request to be processed and the attributes to be deleted.

Returns:
The update condition which, if specified, determines whether the specified attributes will be deleted or not. The update condition must be satisfied in order for this request to be processed and the attributes to be deleted.
    public UpdateCondition getExpected() {
        return ;
    }
    
    
The update condition which, if specified, determines whether the specified attributes will be deleted or not. The update condition must be satisfied in order for this request to be processed and the attributes to be deleted.

Parameters:
expected The update condition which, if specified, determines whether the specified attributes will be deleted or not. The update condition must be satisfied in order for this request to be processed and the attributes to be deleted.
    public void setExpected(UpdateCondition expected) {
        this. = expected;
    }
    
    
The update condition which, if specified, determines whether the specified attributes will be deleted or not. The update condition must be satisfied in order for this request to be processed and the attributes to be deleted.

Returns a reference to this object so that method calls can be chained together.

Parameters:
expected The update condition which, if specified, determines whether the specified attributes will be deleted or not. The update condition must be satisfied in order for this request to be processed and the attributes to be deleted.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = expected;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getDomainName() != nullsb.append("DomainName: " + getDomainName() + ",");
        if (getItemName() != nullsb.append("ItemName: " + getItemName() + ",");
        if (getAttributes() != nullsb.append("Attributes: " + getAttributes() + ",");
        if (getExpected() != nullsb.append("Expected: " + getExpected() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getDomainName() == null) ? 0 : getDomainName().hashCode()); 
        hashCode = prime * hashCode + ((getItemName() == null) ? 0 : getItemName().hashCode()); 
        hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); 
        hashCode = prime * hashCode + ((getExpected() == null) ? 0 : getExpected().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DeleteAttributesRequest == falsereturn false;
        DeleteAttributesRequest other = (DeleteAttributesRequest)obj;
        
        if (other.getDomainName() == null ^ this.getDomainName() == nullreturn false;
        if (other.getDomainName() != null && other.getDomainName().equals(this.getDomainName()) == falsereturn false
        if (other.getItemName() == null ^ this.getItemName() == nullreturn false;
        if (other.getItemName() != null && other.getItemName().equals(this.getItemName()) == falsereturn false
        if (other.getAttributes() == null ^ this.getAttributes() == nullreturn false;
        if (other.getAttributes() != null && other.getAttributes().equals(this.getAttributes()) == falsereturn false
        if (other.getExpected() == null ^ this.getExpected() == nullreturn false;
        if (other.getExpected() != null && other.getExpected().equals(this.getExpected()) == falsereturn false
        return true;
    }
    
    @Override
    public DeleteAttributesRequest clone() {
        
            return (DeleteAttributesRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X