public Item withPrimaryKey(PrimaryKey primaryKey) {
        rejectNullValue(primaryKey);
        if (primaryKey.getComponents().size() == 0)
            throw new IllegalArgumentException("primary key must not be empty");
        for (KeyAttribute ka: primaryKey.getComponents())
            this.with(ka.getName(), ka.getValue());
        return this;
    }
Convenient methods - sets the attributes of this item from the given
key attributes.
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java