类 GetItemRequest


  • public class GetItemRequest
    extends AbstractBceRequest
    Represents the input of a GetItem operation.
    • 构造器详细资料

      • 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.
        覆盖:
        toString 在类中 Object
        返回:
        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.