类 KeysAndAttributes


  • public class KeysAndAttributes
    extends Object
    Represents a set of keys and, for each key, the attributes to retrieve from the table.
    • 构造器详细资料

      • KeysAndAttributes

        public KeysAndAttributes()
        Constructs a new KeysAndAttributes object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
    • 方法详细资料

      • withKeys

        public KeysAndAttributes withKeys​(List<Key> keys)
        Set the list of Keys to get associated items.
        参数:
        keys - The key attributes and values to get items from a table.
        返回:
        Returns a reference to this object so that method calls can be chained together.
      • setKeys

        public void setKeys​(List<Key> keys)
        Set the list of Keys to get associated items.
        参数:
        keys - The key attributes and values to get items from a table.
        抛出:
        IllegalArgumentException - if the list is empty.
      • setConsistentRead

        public void setConsistentRead​(boolean consistentRead)
        Set the type of the consistency of a read operation.The default value is false, representing that it is eventually consistent read. If the value is true, it is a strongly consistent read.
        参数:
        consistentRead - The consistency of a read operation. The default value is false, representing that it is eventually consistent read. If the value is true, it is a strongly consistent read.
      • withConsistentRead

        public KeysAndAttributes withConsistentRead​(boolean consistentRead)
        Set the type of the consistency of a read operation.The default value is false, representing that it is eventually consistent read. If the value is true, it is a strongly consistent read.
        参数:
        consistentRead - The consistency of a read operation. The default value is false, representing that it is eventually consistent read. If the value is true, it is a strongly consistent read.
        返回:
        Returns a reference to this object so that method calls can be chained together.
      • withAttributesToGet

        public KeysAndAttributes withAttributesToGet​(List<String> attributes)
        Attributes to retrieve from the table.
        参数:
        attributes - The attributes to retrieve from an item.
        返回:
        Returns a reference to this object so that method calls can be chained together.
      • setAttributesToGet

        public void setAttributesToGet​(List<String> attributes)
        Attributes to retrieve from the table.
        参数:
        attributes - The attributes to retrieve from an item.
      • isConsistentRead

        public boolean isConsistentRead()
        Return true if the consistency is a strongly consistent read; else return false.
        返回:
        The consistency of a read operation.The default value is false, representing that it is eventually consistent read. If the value is true, it is a strongly consistent read.
      • getAttributesToGet

        public List<String> getAttributesToGet()
        Get all of the attributes to retrieve from a table.
        返回:
        All of the attributes to retrieve from a table.
      • getKeys

        public List<Key> getKeys()
        Get the key attributes the define the items and the attributes associated with the items in this object.
        返回:
        A list of Key with key attributes and theirs attribute values.
      • toString

        public String toString()
        Return a string representation of the object.
        覆盖:
        toString 在类中 Object
        返回:
        A string representation of the object.