类 Key


  • public class Key
    extends Object
    Represents the Key part for an item. For each Key, it maybe an attribute for hashkey or two attributes for hashkey and rangekey.
    • 构造器详细资料

      • Key

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

        public Key​(String attributeName,
                   AttributeValue value)
        Constructs a new Key object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
        参数:
        attributeName - The attribute name to set for a key.
        value - The attribute value to set for a key.
      • Key

        public Key​(String hashKeyName,
                   AttributeValue hashKeyValue,
                   String rangeKeyName,
                   AttributeValue rangeKeyValue)
        Constructs a new Key object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
        参数:
        hashKeyName - The attribute name to set for a hashKey.
        hashKeyValue - The attribute value to set for a hashKey.
        rangeKeyName - The attribute name to set for a rangeKey.
        rangeKeyValue - The attribute value to set for a rangeKey.
      • Key

        public Key​(Map<String,​AttributeValue> attributes)
        Constructs a new Key object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
        参数:
        attributes - An attribute map with name and value to set for a key.
    • 方法详细资料

      • withAttribute

        public Key withAttribute​(String attributeName,
                                 AttributeValue value)
        The method set attribute name and attribute value with input parameters for a key. Returns a reference to this object so that method calls can be chained together.
        参数:
        attributeName - The attribute name to set for a key.
        value - The attribute value to set for a key.
        返回:
        A reference to this object so that method calls can be chained together.
      • getAttributes

        public Map<String,​AttributeValue> getAttributes()
        Get this object's attribute map with name and value.
        返回:
        A map of attributes with name and value.
      • setAttributes

        public void setAttributes​(Map<String,​AttributeValue> attributes)
        Set this object with a given attribute value map.
        参数:
        attributes - An attribute value map to be set for this object.
      • withAttributes

        public Key withAttributes​(Map<String,​AttributeValue> attributes)
        Set this object with a given attribute value map.
        参数:
        attributes - An attribute value map to be set for this object.
        返回:
        A reference to this object so that method calls can be chained together.
      • toString

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