code: public void setKey(java.util.Map.Entry<String, AttributeValue> hashKey, java.util.Map.Entry<String, AttributeValue> rangeKey)
              throws IllegalArgumentException {
          java.util.HashMap<String, AttributeValue> key = new java.util.HashMap<String, AttributeValue>();
          if (hashKey != null) {
              key.put(hashKey.getKey(), hashKey.getValue());
          } else {
              throw new IllegalArgumentException("hashKey must be non-null object.");
          }
          if (rangeKey != null) {
              key.put(rangeKey.getKey(), rangeKey.getValue());
          }
          setKey(key);
      }
docs: Set the hash and range key attributes of the item.
  <p>
  For a hash-only table, you only need to provide the hash attribute. For a hash-and-range table, you must provide
  both.
  
  @param hashKey
  a map entry including the name and value of the primary hash key.
  @param rangeKey
  a map entry including the name and value of the primary range key, or null if it is a hash-only table.