|
Did this page help you?Yes No Tell us about it... |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.dynamodbv2.model.GetItemRequest
public class GetItemRequest
Container for the parameters to the GetItem operation
.
The GetItem operation returns a set of attributes for the item with the given primary key. If there is no matching item, GetItem does not return any data.
GetItem provides an eventually consistent read by default. If your application requires a strongly consistent read, set ConsistentRead
to true
. Although a strongly consistent read might take more time than an eventually consistent read, it always returns the last updated
value.
AmazonDynamoDB.getItem(GetItemRequest)
,
Serialized FormConstructor Summary | |
---|---|
GetItemRequest()
Default constructor for a new GetItemRequest object. |
|
GetItemRequest(String tableName,
Map<String,AttributeValue> key)
Constructs a new GetItemRequest object. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
List<String> |
getAttributesToGet()
The names of one or more attributes to retrieve. |
Boolean |
getConsistentRead()
If set to true , then the operation uses strongly
consistent reads; otherwise, eventually consistent reads are used. |
Map<String,AttributeValue> |
getKey()
A map of attribute names to AttributeValue objects, representing the primary key of the item to retrieve. |
String |
getReturnConsumedCapacity()
Determines whether to include consumed capacity information in the output. |
String |
getTableName()
The name of the table containing the requested item. |
int |
hashCode()
|
Boolean |
isConsistentRead()
If set to true , then the operation uses strongly
consistent reads; otherwise, eventually consistent reads are used. |
void |
setAttributesToGet(Collection<String> attributesToGet)
The names of one or more attributes to retrieve. |
void |
setConsistentRead(Boolean consistentRead)
If set to true , then the operation uses strongly
consistent reads; otherwise, eventually consistent reads are used. |
void |
setKey(Map<String,AttributeValue> key)
A map of attribute names to AttributeValue objects, representing the primary key of the item to retrieve. |
void |
setReturnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity)
Determines whether to include consumed capacity information in the output. |
void |
setReturnConsumedCapacity(String returnConsumedCapacity)
Determines whether to include consumed capacity information in the output. |
void |
setTableName(String tableName)
The name of the table containing the requested item. |
String |
toString()
Returns a string representation of this object; useful for testing and debugging. |
GetItemRequest |
withAttributesToGet(Collection<String> attributesToGet)
The names of one or more attributes to retrieve. |
GetItemRequest |
withAttributesToGet(String... attributesToGet)
The names of one or more attributes to retrieve. |
GetItemRequest |
withConsistentRead(Boolean consistentRead)
If set to true , then the operation uses strongly
consistent reads; otherwise, eventually consistent reads are used. |
GetItemRequest |
withKey(Map<String,AttributeValue> key)
A map of attribute names to AttributeValue objects, representing the primary key of the item to retrieve. |
GetItemRequest |
withReturnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity)
Determines whether to include consumed capacity information in the output. |
GetItemRequest |
withReturnConsumedCapacity(String returnConsumedCapacity)
Determines whether to include consumed capacity information in the output. |
GetItemRequest |
withTableName(String tableName)
The name of the table containing the requested item. |
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, Map<String,AttributeValue> key)
tableName
- The name of the table containing the requested item.key
- A map of attribute names to AttributeValue objects,
representing the primary key of the item to retrieve.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 name of the table containing the requested item.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 name of the table containing the requested item.
public Map<String,AttributeValue> getKey()
public void setKey(Map<String,AttributeValue> key)
key
- A map of attribute names to AttributeValue objects,
representing the primary key of the item to retrieve.public GetItemRequest withKey(Map<String,AttributeValue> key)
Returns a reference to this object so that method calls can be chained together.
key
- A map of attribute names to AttributeValue objects,
representing the primary key of the item to retrieve.
public List<String> getAttributesToGet()
Constraints:
Length: 1 -
public void setAttributesToGet(Collection<String> attributesToGet)
Constraints:
Length: 1 -
attributesToGet
- The names of one or more attributes to retrieve. If no attribute names
are specified, then all attributes will be returned. If any of the
requested 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
- The names of one or more attributes to retrieve. If no attribute names
are specified, then all attributes will be returned. If any of the
requested 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
- The names of one or more attributes to retrieve. If no attribute names
are specified, then all attributes will be returned. If any of the
requested attributes are not found, they will not appear in the
result.
public Boolean isConsistentRead()
true
, then the operation uses strongly
consistent reads; otherwise, eventually consistent reads are used.
true
, then the operation uses strongly
consistent reads; otherwise, eventually consistent reads are used.public void setConsistentRead(Boolean consistentRead)
true
, then the operation uses strongly
consistent reads; otherwise, eventually consistent reads are used.
consistentRead
- If set to true
, then the operation uses strongly
consistent reads; otherwise, eventually consistent reads are used.public GetItemRequest withConsistentRead(Boolean consistentRead)
true
, then the operation uses strongly
consistent reads; otherwise, eventually consistent reads are used.
Returns a reference to this object so that method calls can be chained together.
consistentRead
- If set to true
, then the operation uses strongly
consistent reads; otherwise, eventually consistent reads are used.
public Boolean getConsistentRead()
true
, then the operation uses strongly
consistent reads; otherwise, eventually consistent reads are used.
true
, then the operation uses strongly
consistent reads; otherwise, eventually consistent reads are used.public String getReturnConsumedCapacity()
TOTAL
, then this information is
shown in the output; otherwise, the consumed capacity information is
not shown.
Constraints:
Allowed Values: TOTAL, NONE
TOTAL
, then this information is
shown in the output; otherwise, the consumed capacity information is
not shown.ReturnConsumedCapacity
public void setReturnConsumedCapacity(String returnConsumedCapacity)
TOTAL
, then this information is
shown in the output; otherwise, the consumed capacity information is
not shown.
Constraints:
Allowed Values: TOTAL, NONE
returnConsumedCapacity
- Determines whether to include consumed capacity information in the
output. If this is set to TOTAL
, then this information is
shown in the output; otherwise, the consumed capacity information is
not shown.ReturnConsumedCapacity
public GetItemRequest withReturnConsumedCapacity(String returnConsumedCapacity)
TOTAL
, then this information is
shown in the output; otherwise, the consumed capacity information is
not shown.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: TOTAL, NONE
returnConsumedCapacity
- Determines whether to include consumed capacity information in the
output. If this is set to TOTAL
, then this information is
shown in the output; otherwise, the consumed capacity information is
not shown.
ReturnConsumedCapacity
public void setReturnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity)
TOTAL
, then this information is
shown in the output; otherwise, the consumed capacity information is
not shown.
Constraints:
Allowed Values: TOTAL, NONE
returnConsumedCapacity
- Determines whether to include consumed capacity information in the
output. If this is set to TOTAL
, then this information is
shown in the output; otherwise, the consumed capacity information is
not shown.ReturnConsumedCapacity
public GetItemRequest withReturnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity)
TOTAL
, then this information is
shown in the output; otherwise, the consumed capacity information is
not shown.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: TOTAL, NONE
returnConsumedCapacity
- Determines whether to include consumed capacity information in the
output. If this is set to TOTAL
, then this information is
shown in the output; otherwise, the consumed capacity information is
not shown.
ReturnConsumedCapacity
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 |