com.baidubce.services.moladb.model
Class GetItemRequest

java.lang.Object
  extended by com.baidubce.model.AbstractBceRequest
      extended by com.baidubce.services.moladb.model.GetItemRequest

public class GetItemRequest
extends AbstractBceRequest

Represents the input of a GetItem operation.


Constructor Summary
GetItemRequest()
          Constructs a new GetItemRequest object.
GetItemRequest(String tableName)
          Constructs a new GetItemRequest object.
 
Method Summary
 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.
 
Methods inherited from class com.baidubce.model.AbstractBceRequest
getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GetItemRequest

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


GetItemRequest

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

Parameters:
tableName - The name of the table to that to be get item from.
Method Detail

toString

public String toString()
Return a string representation of the object.

Overrides:
toString in class Object
Returns:
A string representation of the object.

withKey

public GetItemRequest withKey(Key key)
The method set the Key that used to get item from the table. a reference to this object so that method calls can be chained together.

Parameters:
key - The key that used to describe the key field.
Returns:
A reference to this updated object so that method calls can be chained together

setKey

public void setKey(Key key)
The method set the Key that used to get item from the table. a reference to this object so that method calls can be chained together.

Parameters:
key - The key that used to describe the key field.

getKey

public Key getKey()
The method return the Key that is used to get the item.

Returns:
Key to get the item

setConsistentRead

public void setConsistentRead(boolean consistent)
The method set this read as consistent read.

Parameters:
consistent - Set consistent read as true or false

withConsistentRead

public GetItemRequest withConsistentRead(boolean consistent)
The method set this read as consistent read. a reference to this object so that method calls can be chained together.

Parameters:
consistent - Set consistent read as true or false
Returns:
A reference to this object so that method calls can be chained together

isConsistentRead

public boolean isConsistentRead()
The method return this consistent read flag.

Returns:
Return this request is a consistent read or not

setTableName

public void setTableName(String tableName)
The method set the table name.

Parameters:
tableName - The name of the table to get the items.

withTableName

public GetItemRequest withTableName(String tableName)
The method set the table name.

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

getTableName

public String getTableName()
The method return the table name of this request

Returns:
Table name of this request

setAttributesToGet

public void setAttributesToGet(List<String> attributeNames)
The method specify the attributes that is expected to return from the table. a reference to this object so that method calls can be chained together.

Parameters:
attributeNames - The attribute name list which are expected to be returned from the table.

withAttributesToGet

public GetItemRequest withAttributesToGet(List<String> attributeNames)
The method specify the attributes that is expected to return from the table. a reference to this object so that method calls can be chained together.

Parameters:
attributeNames - The attribute name list which are expected to be returned from the table.
Returns:
A reference to this object so that method calls can be chained together

getAttributesToGet

public List<String> getAttributesToGet()
The method return all the attribute names which are expected to return from the table.

Returns:
List of the expected attribute names.

withRequestCredentials

public GetItemRequest withRequestCredentials(BceCredentials credentials)
Specified by:
withRequestCredentials in class AbstractBceRequest


Copyright © 2018. All rights reserved.