com.amazonaws.services.dynamodb.model
Class ScanRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.dynamodb.model.ScanRequest

public class ScanRequest
extends AmazonWebServiceRequest

Container for the parameters to the Scan operation.

Retrieves one or more items and its attributes by performing a full scan of a table.

Provide a ScanFilter to get more specific results.

See Also:
AmazonDynamoDB.scan(ScanRequest)

Constructor Summary
ScanRequest()
          Default constructor for a new ScanRequest object.
ScanRequest(String tableName)
          Constructs a new ScanRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 List<String> getAttributesToGet()
          List of Attribute names.
 Boolean getCount()
          If set to true, Amazon DynamoDB returns a total number of items for the Scan operation, even if the operation has no matching items for the assigned filter.
 Key getExclusiveStartKey()
          Primary key of the item from which to continue an earlier scan.
 Integer getLimit()
          The maximum number of items to return.
 Map<String,Condition> getScanFilter()
          Evaluates the scan results and returns only the desired values.
 String getTableName()
          The name of the table in which you want to scan.
 int hashCode()
           
 Boolean isCount()
          If set to true, Amazon DynamoDB returns a total number of items for the Scan operation, even if the operation has no matching items for the assigned filter.
 void setAttributesToGet(Collection<String> attributesToGet)
          List of Attribute names.
 void setCount(Boolean count)
          If set to true, Amazon DynamoDB returns a total number of items for the Scan operation, even if the operation has no matching items for the assigned filter.
 void setExclusiveStartKey(Key exclusiveStartKey)
          Primary key of the item from which to continue an earlier scan.
 void setLimit(Integer limit)
          The maximum number of items to return.
 void setScanFilter(Map<String,Condition> scanFilter)
          Evaluates the scan results and returns only the desired values.
 void setTableName(String tableName)
          The name of the table in which you want to scan.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 ScanRequest withAttributesToGet(Collection<String> attributesToGet)
          List of Attribute names.
 ScanRequest withAttributesToGet(String... attributesToGet)
          List of Attribute names.
 ScanRequest withCount(Boolean count)
          If set to true, Amazon DynamoDB returns a total number of items for the Scan operation, even if the operation has no matching items for the assigned filter.
 ScanRequest withExclusiveStartKey(Key exclusiveStartKey)
          Primary key of the item from which to continue an earlier scan.
 ScanRequest withLimit(Integer limit)
          The maximum number of items to return.
 ScanRequest withScanFilter(Map<String,Condition> scanFilter)
          Evaluates the scan results and returns only the desired values.
 ScanRequest withTableName(String tableName)
          The name of the table in which you want to scan.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScanRequest

public ScanRequest()
Default constructor for a new ScanRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


ScanRequest

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

Parameters:
tableName - The name of the table in which you want to scan. Allowed characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and . (period).
Method Detail

getTableName

public String getTableName()
The name of the table in which you want to scan. Allowed characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and . (period).

Constraints:
Length: 3 - 255
Pattern: [a-zA-Z0-9_.-]+

Returns:
The name of the table in which you want to scan. Allowed characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and . (period).

setTableName

public void setTableName(String tableName)
The name of the table in which you want to scan. Allowed characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and . (period).

Constraints:
Length: 3 - 255
Pattern: [a-zA-Z0-9_.-]+

Parameters:
tableName - The name of the table in which you want to scan. Allowed characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and . (period).

withTableName

public ScanRequest withTableName(String tableName)
The name of the table in which you want to scan. Allowed characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and . (period).

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

Constraints:
Length: 3 - 255
Pattern: [a-zA-Z0-9_.-]+

Parameters:
tableName - The name of the table in which you want to scan. Allowed characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and . (period).
Returns:
A reference to this updated object so that method calls can be chained together.

getAttributesToGet

public List<String> getAttributesToGet()
List of Attribute names. If attribute names are not specified then all attributes will be returned. If some attributes are not found, they will not appear in the result.

Constraints:
Length: 1 -

Returns:
List of Attribute names. If attribute names are not specified then all attributes will be returned. If some attributes are not found, they will not appear in the result.

setAttributesToGet

public void setAttributesToGet(Collection<String> attributesToGet)
List of Attribute names. If attribute names are not specified then all attributes will be returned. If some attributes are not found, they will not appear in the result.

Constraints:
Length: 1 -

Parameters:
attributesToGet - List of Attribute names. If attribute names are not specified then all attributes will be returned. If some attributes are not found, they will not appear in the result.

withAttributesToGet

public ScanRequest withAttributesToGet(String... attributesToGet)
List of Attribute names. If attribute names are not specified then all attributes will be returned. If some attributes are not found, they will not appear in the result.

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

Constraints:
Length: 1 -

Parameters:
attributesToGet - List of Attribute names. If attribute names are not specified then all attributes will be returned. If some attributes are not found, they will not appear in the result.
Returns:
A reference to this updated object so that method calls can be chained together.

withAttributesToGet

public ScanRequest withAttributesToGet(Collection<String> attributesToGet)
List of Attribute names. If attribute names are not specified then all attributes will be returned. If some attributes are not found, they will not appear in the result.

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

Constraints:
Length: 1 -

Parameters:
attributesToGet - List of Attribute names. If attribute names are not specified then all attributes will be returned. If some attributes are not found, they will not appear in the result.
Returns:
A reference to this updated object so that method calls can be chained together.

getLimit

public Integer getLimit()
The maximum number of items to return. If Amazon DynamoDB hits this limit while scanning the table, it stops the scan and returns the matching values up to the limit, and a LastEvaluatedKey to apply in a subsequent operation to continue the scan. Also, if the scanned data set size exceeds 1 MB before Amazon DynamoDB hits this limit, it stops the scan and returns the matching values up to the limit, and a LastEvaluatedKey to apply in a subsequent operation to continue the scan.

Constraints:
Range: 1 -

Returns:
The maximum number of items to return. If Amazon DynamoDB hits this limit while scanning the table, it stops the scan and returns the matching values up to the limit, and a LastEvaluatedKey to apply in a subsequent operation to continue the scan. Also, if the scanned data set size exceeds 1 MB before Amazon DynamoDB hits this limit, it stops the scan and returns the matching values up to the limit, and a LastEvaluatedKey to apply in a subsequent operation to continue the scan.

setLimit

public void setLimit(Integer limit)
The maximum number of items to return. If Amazon DynamoDB hits this limit while scanning the table, it stops the scan and returns the matching values up to the limit, and a LastEvaluatedKey to apply in a subsequent operation to continue the scan. Also, if the scanned data set size exceeds 1 MB before Amazon DynamoDB hits this limit, it stops the scan and returns the matching values up to the limit, and a LastEvaluatedKey to apply in a subsequent operation to continue the scan.

Constraints:
Range: 1 -

Parameters:
limit - The maximum number of items to return. If Amazon DynamoDB hits this limit while scanning the table, it stops the scan and returns the matching values up to the limit, and a LastEvaluatedKey to apply in a subsequent operation to continue the scan. Also, if the scanned data set size exceeds 1 MB before Amazon DynamoDB hits this limit, it stops the scan and returns the matching values up to the limit, and a LastEvaluatedKey to apply in a subsequent operation to continue the scan.

withLimit

public ScanRequest withLimit(Integer limit)
The maximum number of items to return. If Amazon DynamoDB hits this limit while scanning the table, it stops the scan and returns the matching values up to the limit, and a LastEvaluatedKey to apply in a subsequent operation to continue the scan. Also, if the scanned data set size exceeds 1 MB before Amazon DynamoDB hits this limit, it stops the scan and returns the matching values up to the limit, and a LastEvaluatedKey to apply in a subsequent operation to continue the scan.

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

Constraints:
Range: 1 -

Parameters:
limit - The maximum number of items to return. If Amazon DynamoDB hits this limit while scanning the table, it stops the scan and returns the matching values up to the limit, and a LastEvaluatedKey to apply in a subsequent operation to continue the scan. Also, if the scanned data set size exceeds 1 MB before Amazon DynamoDB hits this limit, it stops the scan and returns the matching values up to the limit, and a LastEvaluatedKey to apply in a subsequent operation to continue the scan.
Returns:
A reference to this updated object so that method calls can be chained together.

isCount

public Boolean isCount()
If set to true, Amazon DynamoDB returns a total number of items for the Scan operation, even if the operation has no matching items for the assigned filter. Do not set Count to true while providing a list of AttributesToGet, otherwise Amazon DynamoDB returns a validation error.

Returns:
If set to true, Amazon DynamoDB returns a total number of items for the Scan operation, even if the operation has no matching items for the assigned filter. Do not set Count to true while providing a list of AttributesToGet, otherwise Amazon DynamoDB returns a validation error.

setCount

public void setCount(Boolean count)
If set to true, Amazon DynamoDB returns a total number of items for the Scan operation, even if the operation has no matching items for the assigned filter. Do not set Count to true while providing a list of AttributesToGet, otherwise Amazon DynamoDB returns a validation error.

Parameters:
count - If set to true, Amazon DynamoDB returns a total number of items for the Scan operation, even if the operation has no matching items for the assigned filter. Do not set Count to true while providing a list of AttributesToGet, otherwise Amazon DynamoDB returns a validation error.

withCount

public ScanRequest withCount(Boolean count)
If set to true, Amazon DynamoDB returns a total number of items for the Scan operation, even if the operation has no matching items for the assigned filter. Do not set Count to true while providing a list of AttributesToGet, otherwise Amazon DynamoDB returns a validation error.

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

Parameters:
count - If set to true, Amazon DynamoDB returns a total number of items for the Scan operation, even if the operation has no matching items for the assigned filter. Do not set Count to true while providing a list of AttributesToGet, otherwise Amazon DynamoDB returns a validation error.
Returns:
A reference to this updated object so that method calls can be chained together.

getCount

public Boolean getCount()
If set to true, Amazon DynamoDB returns a total number of items for the Scan operation, even if the operation has no matching items for the assigned filter. Do not set Count to true while providing a list of AttributesToGet, otherwise Amazon DynamoDB returns a validation error.

Returns:
If set to true, Amazon DynamoDB returns a total number of items for the Scan operation, even if the operation has no matching items for the assigned filter. Do not set Count to true while providing a list of AttributesToGet, otherwise Amazon DynamoDB returns a validation error.

getScanFilter

public Map<String,Condition> getScanFilter()
Evaluates the scan results and returns only the desired values.

Returns:
Evaluates the scan results and returns only the desired values.

setScanFilter

public void setScanFilter(Map<String,Condition> scanFilter)
Evaluates the scan results and returns only the desired values.

Parameters:
scanFilter - Evaluates the scan results and returns only the desired values.

withScanFilter

public ScanRequest withScanFilter(Map<String,Condition> scanFilter)
Evaluates the scan results and returns only the desired values.

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

Parameters:
scanFilter - Evaluates the scan results and returns only the desired values.
Returns:
A reference to this updated object so that method calls can be chained together.

getExclusiveStartKey

public Key getExclusiveStartKey()
Primary key of the item from which to continue an earlier scan. An earlier scan might provide this value if that scan operation was interrupted before scanning the entire table; either because of the result set size or the Limit parameter. The LastEvaluatedKey can be passed back in a new scan request to continue the operation from that point.

Returns:
Primary key of the item from which to continue an earlier scan. An earlier scan might provide this value if that scan operation was interrupted before scanning the entire table; either because of the result set size or the Limit parameter. The LastEvaluatedKey can be passed back in a new scan request to continue the operation from that point.

setExclusiveStartKey

public void setExclusiveStartKey(Key exclusiveStartKey)
Primary key of the item from which to continue an earlier scan. An earlier scan might provide this value if that scan operation was interrupted before scanning the entire table; either because of the result set size or the Limit parameter. The LastEvaluatedKey can be passed back in a new scan request to continue the operation from that point.

Parameters:
exclusiveStartKey - Primary key of the item from which to continue an earlier scan. An earlier scan might provide this value if that scan operation was interrupted before scanning the entire table; either because of the result set size or the Limit parameter. The LastEvaluatedKey can be passed back in a new scan request to continue the operation from that point.

withExclusiveStartKey

public ScanRequest withExclusiveStartKey(Key exclusiveStartKey)
Primary key of the item from which to continue an earlier scan. An earlier scan might provide this value if that scan operation was interrupted before scanning the entire table; either because of the result set size or the Limit parameter. The LastEvaluatedKey can be passed back in a new scan request to continue the operation from that point.

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

Parameters:
exclusiveStartKey - Primary key of the item from which to continue an earlier scan. An earlier scan might provide this value if that scan operation was interrupted before scanning the entire table; either because of the result set size or the Limit parameter. The LastEvaluatedKey can be passed back in a new scan request to continue the operation from that point.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

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

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


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