com.amazonaws.services.dynamodbv2.model
Class QueryResult

java.lang.Object
  extended by com.amazonaws.services.dynamodbv2.model.QueryResult
All Implemented Interfaces:
java.io.Serializable

public class QueryResult
extends java.lang.Object
implements java.io.Serializable

Represents the output of a Query operation.

See Also:
Serialized Form

Constructor Summary
QueryResult()
           
 
Method Summary
 QueryResult addLastEvaluatedKeyEntry(java.lang.String key, AttributeValue value)
          The primary key of the item where the operation stopped, inclusive of the previous result set.
 QueryResult clearLastEvaluatedKeyEntries()
          Removes all the entries added into LastEvaluatedKey.
 boolean equals(java.lang.Object obj)
           
 ConsumedCapacity getConsumedCapacity()
          Represents the capacity units consumed by an operation.
 java.lang.Integer getCount()
          The number of items in the response.
 java.util.List<java.util.Map<java.lang.String,AttributeValue>> getItems()
          An array of item attributes that match the query criteria.
 java.util.Map<java.lang.String,AttributeValue> getLastEvaluatedKey()
          The primary key of the item where the operation stopped, inclusive of the previous result set.
 java.lang.Integer getScannedCount()
          The number of items evaluated, before any QueryFilter is applied.
 int hashCode()
           
 void setConsumedCapacity(ConsumedCapacity consumedCapacity)
          Represents the capacity units consumed by an operation.
 void setCount(java.lang.Integer count)
          The number of items in the response.
 void setItems(java.util.Collection<java.util.Map<java.lang.String,AttributeValue>> items)
          An array of item attributes that match the query criteria.
 void setLastEvaluatedKey(java.util.Map<java.lang.String,AttributeValue> lastEvaluatedKey)
          The primary key of the item where the operation stopped, inclusive of the previous result set.
 void setScannedCount(java.lang.Integer scannedCount)
          The number of items evaluated, before any QueryFilter is applied.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 QueryResult withConsumedCapacity(ConsumedCapacity consumedCapacity)
          Represents the capacity units consumed by an operation.
 QueryResult withCount(java.lang.Integer count)
          The number of items in the response.
 QueryResult withItems(java.util.Collection<java.util.Map<java.lang.String,AttributeValue>> items)
          An array of item attributes that match the query criteria.
 QueryResult withItems(java.util.Map<java.lang.String,AttributeValue>... items)
          An array of item attributes that match the query criteria.
 QueryResult withLastEvaluatedKey(java.util.Map<java.lang.String,AttributeValue> lastEvaluatedKey)
          The primary key of the item where the operation stopped, inclusive of the previous result set.
 QueryResult withScannedCount(java.lang.Integer scannedCount)
          The number of items evaluated, before any QueryFilter is applied.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryResult

public QueryResult()
Method Detail

getItems

public java.util.List<java.util.Map<java.lang.String,AttributeValue>> getItems()
An array of item attributes that match the query criteria. Each element in this array consists of an attribute name and the value for that attribute.

Returns:
An array of item attributes that match the query criteria. Each element in this array consists of an attribute name and the value for that attribute.

setItems

public void setItems(java.util.Collection<java.util.Map<java.lang.String,AttributeValue>> items)
An array of item attributes that match the query criteria. Each element in this array consists of an attribute name and the value for that attribute.

Parameters:
items - An array of item attributes that match the query criteria. Each element in this array consists of an attribute name and the value for that attribute.

withItems

public QueryResult withItems(java.util.Map<java.lang.String,AttributeValue>... items)
An array of item attributes that match the query criteria. Each element in this array consists of an attribute name and the value for that attribute.

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

Parameters:
items - An array of item attributes that match the query criteria. Each element in this array consists of an attribute name and the value for that attribute.
Returns:
A reference to this updated object so that method calls can be chained together.

withItems

public QueryResult withItems(java.util.Collection<java.util.Map<java.lang.String,AttributeValue>> items)
An array of item attributes that match the query criteria. Each element in this array consists of an attribute name and the value for that attribute.

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

Parameters:
items - An array of item attributes that match the query criteria. Each element in this array consists of an attribute name and the value for that attribute.
Returns:
A reference to this updated object so that method calls can be chained together.

getCount

public java.lang.Integer getCount()
The number of items in the response.

If you used a QueryFilter in the request, then Count is the number of items returned after the filter was applied, and ScannedCount is the number of matching items before the filter was applied.

If you did not use a filter in the request, then Count and ScannedCount are the same.

Returns:
The number of items in the response.

If you used a QueryFilter in the request, then Count is the number of items returned after the filter was applied, and ScannedCount is the number of matching items before the filter was applied.

If you did not use a filter in the request, then Count and ScannedCount are the same.


setCount

public void setCount(java.lang.Integer count)
The number of items in the response.

If you used a QueryFilter in the request, then Count is the number of items returned after the filter was applied, and ScannedCount is the number of matching items before the filter was applied.

If you did not use a filter in the request, then Count and ScannedCount are the same.

Parameters:
count - The number of items in the response.

If you used a QueryFilter in the request, then Count is the number of items returned after the filter was applied, and ScannedCount is the number of matching items before the filter was applied.

If you did not use a filter in the request, then Count and ScannedCount are the same.


withCount

public QueryResult withCount(java.lang.Integer count)
The number of items in the response.

If you used a QueryFilter in the request, then Count is the number of items returned after the filter was applied, and ScannedCount is the number of matching items before the filter was applied.

If you did not use a filter in the request, then Count and ScannedCount are the same.

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

Parameters:
count - The number of items in the response.

If you used a QueryFilter in the request, then Count is the number of items returned after the filter was applied, and ScannedCount is the number of matching items before the filter was applied.

If you did not use a filter in the request, then Count and ScannedCount are the same.

Returns:
A reference to this updated object so that method calls can be chained together.

getScannedCount

public java.lang.Integer getScannedCount()
The number of items evaluated, before any QueryFilter is applied. A high ScannedCount value with few, or no, Count results indicates an inefficient Query operation. For more information, see Count and ScannedCount in the Amazon DynamoDB Developer Guide.

If you did not use a filter in the request, then ScannedCount is the same as Count.

Returns:
The number of items evaluated, before any QueryFilter is applied. A high ScannedCount value with few, or no, Count results indicates an inefficient Query operation. For more information, see Count and ScannedCount in the Amazon DynamoDB Developer Guide.

If you did not use a filter in the request, then ScannedCount is the same as Count.


setScannedCount

public void setScannedCount(java.lang.Integer scannedCount)
The number of items evaluated, before any QueryFilter is applied. A high ScannedCount value with few, or no, Count results indicates an inefficient Query operation. For more information, see Count and ScannedCount in the Amazon DynamoDB Developer Guide.

If you did not use a filter in the request, then ScannedCount is the same as Count.

Parameters:
scannedCount - The number of items evaluated, before any QueryFilter is applied. A high ScannedCount value with few, or no, Count results indicates an inefficient Query operation. For more information, see Count and ScannedCount in the Amazon DynamoDB Developer Guide.

If you did not use a filter in the request, then ScannedCount is the same as Count.


withScannedCount

public QueryResult withScannedCount(java.lang.Integer scannedCount)
The number of items evaluated, before any QueryFilter is applied. A high ScannedCount value with few, or no, Count results indicates an inefficient Query operation. For more information, see Count and ScannedCount in the Amazon DynamoDB Developer Guide.

If you did not use a filter in the request, then ScannedCount is the same as Count.

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

Parameters:
scannedCount - The number of items evaluated, before any QueryFilter is applied. A high ScannedCount value with few, or no, Count results indicates an inefficient Query operation. For more information, see Count and ScannedCount in the Amazon DynamoDB Developer Guide.

If you did not use a filter in the request, then ScannedCount is the same as Count.

Returns:
A reference to this updated object so that method calls can be chained together.

getLastEvaluatedKey

public java.util.Map<java.lang.String,AttributeValue> getLastEvaluatedKey()
The primary key of the item where the operation stopped, inclusive of the previous result set. Use this value to start a new operation, excluding this value in the new request.

If LastEvaluatedKey is null, then the "last page" of results has been processed and there is no more data to be retrieved.

If LastEvaluatedKey is anything other than null, this does not necessarily mean that there is more data in the result set. The only way to know when you have reached the end of the result set is when LastEvaluatedKey is null.

Returns:
The primary key of the item where the operation stopped, inclusive of the previous result set. Use this value to start a new operation, excluding this value in the new request.

If LastEvaluatedKey is null, then the "last page" of results has been processed and there is no more data to be retrieved.

If LastEvaluatedKey is anything other than null, this does not necessarily mean that there is more data in the result set. The only way to know when you have reached the end of the result set is when LastEvaluatedKey is null.


setLastEvaluatedKey

public void setLastEvaluatedKey(java.util.Map<java.lang.String,AttributeValue> lastEvaluatedKey)
The primary key of the item where the operation stopped, inclusive of the previous result set. Use this value to start a new operation, excluding this value in the new request.

If LastEvaluatedKey is null, then the "last page" of results has been processed and there is no more data to be retrieved.

If LastEvaluatedKey is anything other than null, this does not necessarily mean that there is more data in the result set. The only way to know when you have reached the end of the result set is when LastEvaluatedKey is null.

Parameters:
lastEvaluatedKey - The primary key of the item where the operation stopped, inclusive of the previous result set. Use this value to start a new operation, excluding this value in the new request.

If LastEvaluatedKey is null, then the "last page" of results has been processed and there is no more data to be retrieved.

If LastEvaluatedKey is anything other than null, this does not necessarily mean that there is more data in the result set. The only way to know when you have reached the end of the result set is when LastEvaluatedKey is null.


withLastEvaluatedKey

public QueryResult withLastEvaluatedKey(java.util.Map<java.lang.String,AttributeValue> lastEvaluatedKey)
The primary key of the item where the operation stopped, inclusive of the previous result set. Use this value to start a new operation, excluding this value in the new request.

If LastEvaluatedKey is null, then the "last page" of results has been processed and there is no more data to be retrieved.

If LastEvaluatedKey is anything other than null, this does not necessarily mean that there is more data in the result set. The only way to know when you have reached the end of the result set is when LastEvaluatedKey is null.

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

Parameters:
lastEvaluatedKey - The primary key of the item where the operation stopped, inclusive of the previous result set. Use this value to start a new operation, excluding this value in the new request.

If LastEvaluatedKey is null, then the "last page" of results has been processed and there is no more data to be retrieved.

If LastEvaluatedKey is anything other than null, this does not necessarily mean that there is more data in the result set. The only way to know when you have reached the end of the result set is when LastEvaluatedKey is null.

Returns:
A reference to this updated object so that method calls can be chained together.

addLastEvaluatedKeyEntry

public QueryResult addLastEvaluatedKeyEntry(java.lang.String key,
                                            AttributeValue value)
The primary key of the item where the operation stopped, inclusive of the previous result set. Use this value to start a new operation, excluding this value in the new request.

If LastEvaluatedKey is null, then the "last page" of results has been processed and there is no more data to be retrieved.

If LastEvaluatedKey is anything other than null, this does not necessarily mean that there is more data in the result set. The only way to know when you have reached the end of the result set is when LastEvaluatedKey is null.

The method adds a new key-value pair into LastEvaluatedKey parameter, and returns a reference to this object so that method calls can be chained together.

Parameters:
key - The key of the entry to be added into LastEvaluatedKey.
value - The corresponding value of the entry to be added into LastEvaluatedKey.

clearLastEvaluatedKeyEntries

public QueryResult clearLastEvaluatedKeyEntries()
Removes all the entries added into LastEvaluatedKey.

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


getConsumedCapacity

public ConsumedCapacity getConsumedCapacity()
Represents the capacity units consumed by an operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. ConsumedCapacity is only returned if it was asked for in the request. For more information, see Provisioned Throughput in the Amazon DynamoDB Developer Guide.

Returns:
Represents the capacity units consumed by an operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. ConsumedCapacity is only returned if it was asked for in the request. For more information, see Provisioned Throughput in the Amazon DynamoDB Developer Guide.

setConsumedCapacity

public void setConsumedCapacity(ConsumedCapacity consumedCapacity)
Represents the capacity units consumed by an operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. ConsumedCapacity is only returned if it was asked for in the request. For more information, see Provisioned Throughput in the Amazon DynamoDB Developer Guide.

Parameters:
consumedCapacity - Represents the capacity units consumed by an operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. ConsumedCapacity is only returned if it was asked for in the request. For more information, see Provisioned Throughput in the Amazon DynamoDB Developer Guide.

withConsumedCapacity

public QueryResult withConsumedCapacity(ConsumedCapacity consumedCapacity)
Represents the capacity units consumed by an operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. ConsumedCapacity is only returned if it was asked for in the request. For more information, see Provisioned Throughput in the Amazon DynamoDB Developer Guide.

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

Parameters:
consumedCapacity - Represents the capacity units consumed by an operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. ConsumedCapacity is only returned if it was asked for in the request. For more information, see Provisioned Throughput in the Amazon DynamoDB Developer Guide.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

public java.lang.String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.