类 GetItemRequest
- java.lang.Object
-
- com.baidubce.model.AbstractBceRequest
-
- com.baidubce.services.moladb.model.GetItemRequest
-
public class GetItemRequest extends AbstractBceRequest
Represents the input of a GetItem operation.
-
-
构造器概要
构造器 构造器 说明 GetItemRequest()Constructs a new GetItemRequest object.GetItemRequest(String tableName)Constructs a new GetItemRequest object.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 List<String>getAttributesToGet()The method return all the attribute names which are expected to return from the table.KeygetKey()The method return the Key that is used to get the item.StringgetTableName()The method return the table name of this requestbooleanisConsistentRead()The method return this consistent read flag.voidsetAttributesToGet(List<String> attributeNames)The method specify the attributes that is expected to return from the table.voidsetConsistentRead(boolean consistent)The method set this read as consistent read.voidsetKey(Key key)The method set the Key that used to get item from the table.voidsetTableName(String tableName)The method set the table name.StringtoString()Return a string representation of the object.GetItemRequestwithAttributesToGet(List<String> attributeNames)The method specify the attributes that is expected to return from the table.GetItemRequestwithConsistentRead(boolean consistent)The method set this read as consistent read.GetItemRequestwithKey(Key key)The method set the Key that used to get item from the table.GetItemRequestwithRequestCredentials(BceCredentials credentials)GetItemRequestwithTableName(String tableName)The method set the table name.-
从类继承的方法 com.baidubce.model.AbstractBceRequest
getRequestCredentials, setRequestCredentials
-
-
-
-
构造器详细资料
-
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.- 参数:
tableName- The name of the table to that to be get item from.
-
-
方法详细资料
-
toString
public String toString()
Return 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.- 参数:
key- The key that used to describe the key field.- 返回:
- 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.- 参数:
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.- 返回:
- Key to get the item
-
setConsistentRead
public void setConsistentRead(boolean consistent)
The method set this read as consistent read.- 参数:
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.- 参数:
consistent- Set consistent read as true or false- 返回:
- A reference to this object so that method calls can be chained together
-
isConsistentRead
public boolean isConsistentRead()
The method return this consistent read flag.- 返回:
- Return this request is a consistent read or not
-
setTableName
public void setTableName(String tableName)
The method set the table name.- 参数:
tableName- The name of the table to get the items.
-
withTableName
public GetItemRequest withTableName(String tableName)
The method set the table name.- 返回:
- 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- 返回:
- 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.- 参数:
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.- 参数:
attributeNames- The attribute name list which are expected to be returned from the table.- 返回:
- 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.- 返回:
- List of the expected attribute names.
-
withRequestCredentials
public GetItemRequest withRequestCredentials(BceCredentials credentials)
- 指定者:
withRequestCredentials在类中AbstractBceRequest
-
-