|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.dynamodb.model.GetItemRequest
public class GetItemRequest
Container for the parameters to the GetItem operation
.
The GetItem operation returns a set of Attributes for an item that matches the primary key. The GetItem operation provides an eventually consistent read by default. If eventually consistent reads are not acceptable for your application, use ConsistentRead. Although this operation might take longer than a standard read, it always returns the last updated value.
AmazonDynamoDB.getItem(GetItemRequest)
Constructor Summary | |
---|---|
GetItemRequest()
Default constructor for a new GetItemRequest object. |
|
GetItemRequest(String tableName,
Key key)
Constructs a new GetItemRequest object. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
List<String> |
getAttributesToGet()
Array of Attribute names. |
Boolean |
getConsistentRead()
If set to true, then a consistent read is issued, otherwise eventually consistent is used. |
Key |
getKey()
The primary key that uniquely identifies each item in a table. |
String |
getTableName()
Returns the value of the TableName property for this object. |
int |
hashCode()
|
Boolean |
isConsistentRead()
If set to true, then a consistent read is issued, otherwise eventually consistent is used. |
void |
setAttributesToGet(Collection<String> attributesToGet)
Array of Attribute names. |
void |
setConsistentRead(Boolean consistentRead)
If set to true, then a consistent read is issued, otherwise eventually consistent is used. |
void |
setKey(Key key)
The primary key that uniquely identifies each item in a table. |
void |
setTableName(String tableName)
Sets the value of the TableName property for this object. |
String |
toString()
Returns a string representation of this object; useful for testing and debugging. |
GetItemRequest |
withAttributesToGet(Collection<String> attributesToGet)
Array of Attribute names. |
GetItemRequest |
withAttributesToGet(String... attributesToGet)
Array of Attribute names. |
GetItemRequest |
withConsistentRead(Boolean consistentRead)
If set to true, then a consistent read is issued, otherwise eventually consistent is used. |
GetItemRequest |
withKey(Key key)
The primary key that uniquely identifies each item in a table. |
GetItemRequest |
withTableName(String tableName)
Sets the value of the TableName property for this object. |
Methods inherited from class com.amazonaws.AmazonWebServiceRequest |
---|
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GetItemRequest()
public GetItemRequest(String tableName, Key key)
tableName
- key
- The primary key that uniquely identifies each item in a
table. A primary key can be a one attribute (hash) primary key or a
two attribute (hash-and-range) primary key.Method Detail |
---|
public String getTableName()
Constraints:
Length: 3 - 255
Pattern: [a-zA-Z0-9_.-]+
public void setTableName(String tableName)
Constraints:
Length: 3 - 255
Pattern: [a-zA-Z0-9_.-]+
tableName
- The new value for the TableName property for this object.public GetItemRequest withTableName(String tableName)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 3 - 255
Pattern: [a-zA-Z0-9_.-]+
tableName
- The new value for the TableName property for this object.
public Key getKey()
public void setKey(Key key)
key
- The primary key that uniquely identifies each item in a table. A
primary key can be a one attribute (hash) primary key or a two
attribute (hash-and-range) primary key.public GetItemRequest withKey(Key key)
Returns a reference to this object so that method calls can be chained together.
key
- The primary key that uniquely identifies each item in a table. A
primary key can be a one attribute (hash) primary key or a two
attribute (hash-and-range) primary key.
public List<String> getAttributesToGet()
Constraints:
Length: 1 -
public void setAttributesToGet(Collection<String> attributesToGet)
Constraints:
Length: 1 -
attributesToGet
- Array 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.public GetItemRequest withAttributesToGet(String... attributesToGet)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 -
attributesToGet
- Array 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.
public GetItemRequest withAttributesToGet(Collection<String> attributesToGet)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 -
attributesToGet
- Array 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.
public Boolean isConsistentRead()
public void setConsistentRead(Boolean consistentRead)
consistentRead
- If set to true, then a consistent read is issued, otherwise eventually
consistent is used.public GetItemRequest withConsistentRead(Boolean consistentRead)
Returns a reference to this object so that method calls can be chained together.
consistentRead
- If set to true, then a consistent read is issued, otherwise eventually
consistent is used.
public Boolean getConsistentRead()
public String toString()
toString
in class Object
Object.toString()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |