private DeleteItemOutcome doDeleteItem(DeleteItemSpec spec) {
// set the table name
final String tableName = getTable().getTableName();
// set up the keys
DeleteItemRequest req = spec.getRequest().withTableName(tableName)
.withKey(InternalUtils.toAttributeValueMap(spec.getKeyComponents()));
// set up the expected attribute map, if any
final Collection<Expected> expected = spec.getExpected();
final Map<String, ExpectedAttributeValue> expectedMap =
InternalUtils.toExpectedAttributeValueMap(expected);
// set up the value map, if any (when expression API is used)
final Map<String,AttributeValue> attrValMap =
InternalUtils.fromSimpleMap(spec.getValueMap());
// set up the request
req.withConditionalOperator(spec.getConditionalOperator())
.withConditionExpression(spec.getConditionExpression())
.withExpected(expectedMap)
.withExpressionAttributeNames(spec.getNameMap())
.withExpressionAttributeValues(attrValMap)
;