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 Select operation.

The Select operation returns a set of attributes for ItemNames that match the select expression. Select is similar to the standard SQL SELECT statement.

The total size of the response cannot exceed 1 MB in total size. Amazon SimpleDB automatically adjusts the number of items returned per page to enforce this limit. For example, if the client asks to retrieve 2500 items, but each individual item is 10 kB in size, the system returns 100 items and an appropriate NextToken so the client can access the next page of results.

For information on how to construct select expressions, see Using Select to Create Amazon SimpleDB Queries in the Developer Guide.

 
 public class SelectRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The expression used to query the domain.
 
     private String selectExpression;

    
A string informing Amazon SimpleDB where to start the next list of ItemNames.
 
     private String nextToken;

    
Determines whether or not strong consistency should be enforced when data is read from SimpleDB. If true, any data previously written to SimpleDB will be returned. Otherwise, results will be consistent eventually, and the client may not see data that was written immediately before your read.
 
     private Boolean consistentRead;

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

Parameters:
selectExpression The expression used to query the domain.
 
     public SelectRequest(String selectExpression) {
         setSelectExpression(selectExpression);
     }

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

Parameters:
selectExpression The expression used to query the domain.
consistentRead Determines whether or not strong consistency should be enforced when data is read from SimpleDB. If true, any data previously written to SimpleDB will be returned. Otherwise, results will be consistent eventually, and the client may not see data that was written immediately before your read.
 
     public SelectRequest(String selectExpressionBoolean consistentRead) {
         setSelectExpression(selectExpression);
         setConsistentRead(consistentRead);
     }

    
The expression used to query the domain.

Returns:
The expression used to query the domain.
    public String getSelectExpression() {
        return ;
    }
    
    
The expression used to query the domain.

Parameters:
selectExpression The expression used to query the domain.
    public void setSelectExpression(String selectExpression) {
        this. = selectExpression;
    }
    
    
The expression used to query the domain.

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

Parameters:
selectExpression The expression used to query the domain.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SelectRequest withSelectExpression(String selectExpression) {
        this. = selectExpression;
        return this;
    }

    
A string informing Amazon SimpleDB where to start the next list of ItemNames.

Returns:
A string informing Amazon SimpleDB where to start the next list of ItemNames.
    public String getNextToken() {
        return ;
    }
    
    
A string informing Amazon SimpleDB where to start the next list of ItemNames.

Parameters:
nextToken A string informing Amazon SimpleDB where to start the next list of ItemNames.
    public void setNextToken(String nextToken) {
        this. = nextToken;
    }
    
    
A string informing Amazon SimpleDB where to start the next list of ItemNames.

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

Parameters:
nextToken A string informing Amazon SimpleDB where to start the next list of ItemNames.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SelectRequest withNextToken(String nextToken) {
        this. = nextToken;
        return this;
    }

    
Determines whether or not strong consistency should be enforced when data is read from SimpleDB. If true, any data previously written to SimpleDB will be returned. Otherwise, results will be consistent eventually, and the client may not see data that was written immediately before your read.

Returns:
Determines whether or not strong consistency should be enforced when data is read from SimpleDB. If true, any data previously written to SimpleDB will be returned. Otherwise, results will be consistent eventually, and the client may not see data that was written immediately before your read.
    public Boolean isConsistentRead() {
        return ;
    }
    
    
Determines whether or not strong consistency should be enforced when data is read from SimpleDB. If true, any data previously written to SimpleDB will be returned. Otherwise, results will be consistent eventually, and the client may not see data that was written immediately before your read.

Parameters:
consistentRead Determines whether or not strong consistency should be enforced when data is read from SimpleDB. If true, any data previously written to SimpleDB will be returned. Otherwise, results will be consistent eventually, and the client may not see data that was written immediately before your read.
    public void setConsistentRead(Boolean consistentRead) {
        this. = consistentRead;
    }
    
    
Determines whether or not strong consistency should be enforced when data is read from SimpleDB. If true, any data previously written to SimpleDB will be returned. Otherwise, results will be consistent eventually, and the client may not see data that was written immediately before your read.

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

Parameters:
consistentRead Determines whether or not strong consistency should be enforced when data is read from SimpleDB. If true, any data previously written to SimpleDB will be returned. Otherwise, results will be consistent eventually, and the client may not see data that was written immediately before your read.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SelectRequest withConsistentRead(Boolean consistentRead) {
        this. = consistentRead;
        return this;
    }

    
Determines whether or not strong consistency should be enforced when data is read from SimpleDB. If true, any data previously written to SimpleDB will be returned. Otherwise, results will be consistent eventually, and the client may not see data that was written immediately before your read.

Returns:
Determines whether or not strong consistency should be enforced when data is read from SimpleDB. If true, any data previously written to SimpleDB will be returned. Otherwise, results will be consistent eventually, and the client may not see data that was written immediately before your read.
    public Boolean getConsistentRead() {
        return ;
    }

    
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 (getSelectExpression() != nullsb.append("SelectExpression: " + getSelectExpression() + ",");
        if (getNextToken() != nullsb.append("NextToken: " + getNextToken() + ",");
        if (isConsistentRead() != nullsb.append("ConsistentRead: " + isConsistentRead() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getSelectExpression() == null) ? 0 : getSelectExpression().hashCode()); 
        hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); 
        hashCode = prime * hashCode + ((isConsistentRead() == null) ? 0 : isConsistentRead().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof SelectRequest == falsereturn false;
        SelectRequest other = (SelectRequest)obj;
        
        if (other.getSelectExpression() == null ^ this.getSelectExpression() == nullreturn false;
        if (other.getSelectExpression() != null && other.getSelectExpression().equals(this.getSelectExpression()) == falsereturn false
        if (other.getNextToken() == null ^ this.getNextToken() == nullreturn false;
        if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == falsereturn false
        if (other.isConsistentRead() == null ^ this.isConsistentRead() == nullreturn false;
        if (other.isConsistentRead() != null && other.isConsistentRead().equals(this.isConsistentRead()) == falsereturn false
        return true;
    }
    
    @Override
    public SelectRequest clone() {
        
            return (SelectRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X