public class GetItemRequest extends AbstractBceRequest
| Constructor and Description |
|---|
GetItemRequest()
Constructs a new GetItemRequest object.
|
GetItemRequest(String tableName)
Constructs a new GetItemRequest object.
|
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getAttributesToGet()
The method return all the attribute names which are expected to return from the table.
|
Key |
getKey()
The method return the Key that is used to get the item.
|
String |
getTableName()
The method return the table name of this request
|
boolean |
isConsistentRead()
The method return this consistent read flag.
|
void |
setAttributesToGet(List<String> attributeNames)
The method specify the attributes that is expected to return from the table.
|
void |
setConsistentRead(boolean consistent)
The method set this read as consistent read.
|
void |
setKey(Key key)
The method set the Key that used to get item from the table.
|
void |
setTableName(String tableName)
The method set the table name.
|
String |
toString()
Return a string representation of the object.
|
GetItemRequest |
withAttributesToGet(List<String> attributeNames)
The method specify the attributes that is expected to return from the table.
|
GetItemRequest |
withConsistentRead(boolean consistent)
The method set this read as consistent read.
|
GetItemRequest |
withKey(Key key)
The method set the Key that used to get item from the table.
|
GetItemRequest |
withRequestCredentials(BceCredentials credentials) |
GetItemRequest |
withTableName(String tableName)
The method set the table name.
|
getRequestCredentials, setRequestCredentialspublic GetItemRequest()
public GetItemRequest(String tableName)
tableName - The name of the table to that to be get item from.public String toString()
public GetItemRequest withKey(Key key)
key - The key that used to describe the key field.public void setKey(Key key)
key - The key that used to describe the key field.public Key getKey()
public void setConsistentRead(boolean consistent)
consistent - Set consistent read as true or falsepublic GetItemRequest withConsistentRead(boolean consistent)
consistent - Set consistent read as true or falsepublic boolean isConsistentRead()
public void setTableName(String tableName)
tableName - The name of the table to get the items.public GetItemRequest withTableName(String tableName)
public String getTableName()
public void setAttributesToGet(List<String> attributeNames)
attributeNames - The attribute name list which are expected to be returned from the table.public GetItemRequest withAttributesToGet(List<String> attributeNames)
attributeNames - The attribute name list which are expected to be returned from the table.public List<String> getAttributesToGet()
public GetItemRequest withRequestCredentials(BceCredentials credentials)
withRequestCredentials in class AbstractBceRequestCopyright © 2020. All rights reserved.