/** * <p> * The name of the table from which to delete the item. * </p> * * @param tableName * The name of the table from which to delete the item. * @return Returns a reference to this object so that method calls can be chained together. */ public DeleteItemRequest withTableName(String tableName) { setTableName(tableName); return this; }
/** * Constructs a new DeleteItemRequest object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param tableName * The name of the table from which to delete the item. * @param key * A map of attribute names to <code>AttributeValue</code> objects, representing the primary key of the item * to delete.</p> * <p> * For the primary key, you must provide all of the attributes. For example, with a simple primary key, you * only need to provide a value for the partition key. For a composite primary key, you must provide values * for both the partition key and the sort key. */ public DeleteItemRequest(String tableName, java.util.Map<String, AttributeValue> key) { setTableName(tableName); setKey(key); }
setTableName(tableName); setKey(key); setReturnValues(returnValues);
setTableName(tableName); setKey(key); setReturnValues(returnValues.toString());
/** * Constructs a new DeleteItemRequest object. Callers should use the setter * or fluent setter (with...) methods to initialize any additional object * members. * * @param tableName <p> * The name of the table from which to delete the item. * </p> * @param key <p> * A map of attribute names to <code>AttributeValue</code> * objects, representing the primary key of the item to delete. * </p> * <p> * For the primary key, you must provide all of the attributes. * For example, with a simple primary key, you only need to * provide a value for the partition key. For a composite primary * key, you must provide values for both the partition key and * the sort key. * </p> */ public DeleteItemRequest(String tableName, java.util.Map<String, AttributeValue> key) { setTableName(tableName); setKey(key); }
setTableName(tableName); setKey(key); setReturnValues(returnValues);
setTableName(tableName); setKey(key); setReturnValues(returnValues.toString());
throws AmazonServiceException, AmazonClientException { DeleteItemRequest deleteItemRequest = new DeleteItemRequest(); deleteItemRequest.setTableName(tableName); deleteItemRequest.setKey(key); return deleteItem(deleteItemRequest);
throws AmazonServiceException, AmazonClientException { DeleteItemRequest deleteItemRequest = new DeleteItemRequest(); deleteItemRequest.setTableName(tableName); deleteItemRequest.setKey(key); deleteItemRequest.setReturnValues(returnValues);
/** * <p> * The name of the table from which to delete the item. * </p> * * @param tableName * The name of the table from which to delete the item. * @return Returns a reference to this object so that method calls can be chained together. */ public DeleteItemRequest withTableName(String tableName) { setTableName(tableName); return this; }
/** * Constructs a new DeleteItemRequest object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param tableName * The name of the table from which to delete the item. * @param key * A map of attribute names to <code>AttributeValue</code> objects, representing the primary key of the item * to delete.</p> * <p> * For the primary key, you must provide all of the attributes. For example, with a simple primary key, you * only need to provide a value for the partition key. For a composite primary key, you must provide values * for both the partition key and the sort key. */ public DeleteItemRequest(String tableName, java.util.Map<String, AttributeValue> key) { setTableName(tableName); setKey(key); }
/** * {@inheritDoc} */ public void deleteAll() throws DependencyException, InvalidStateException, ProvisionedThroughputException { List<T> allLeases = listLeases(); LOG.warn("Deleting " + allLeases.size() + " items from table " + table); for (T lease : allLeases) { DeleteItemRequest deleteRequest = new DeleteItemRequest(); deleteRequest.setTableName(table); deleteRequest.setKey(serializer.getDynamoHashKey(lease)); dynamoDBClient.deleteItem(deleteRequest); } }
setTableName(tableName); setKey(key); setReturnValues(returnValues);
/** * {@inheritDoc} */ @Override public void deleteLease(T lease) throws DependencyException, InvalidStateException, ProvisionedThroughputException { verifyNotNull(lease, "lease cannot be null"); if (LOG.isDebugEnabled()) { LOG.debug(String.format("Deleting lease with leaseKey %s", lease.getLeaseKey())); } DeleteItemRequest deleteRequest = new DeleteItemRequest(); deleteRequest.setTableName(table); deleteRequest.setKey(serializer.getDynamoHashKey(lease)); try { dynamoDBClient.deleteItem(deleteRequest); } catch (AmazonClientException e) { throw convertAndRethrowExceptions("delete", lease.getLeaseKey(), e); } }
setTableName(tableName); setKey(key); setReturnValues(returnValues.toString());
deleteItemRequest.setTableName(getTableName()); request = deleteItemRequest; } else {
try { final DeleteItemRequest request = new DeleteItemRequest(); request.setTableName(this.self); request.setKey(attributes); request.setReturnValues(ReturnValue.NONE);
public DeletePointResult deletePoint(DeletePointRequest deletePointRequest) { long geohash = S2Manager.generateGeohash(deletePointRequest.getGeoPoint()); long hashKey = S2Manager.generateHashKey(geohash, config.getHashKeyLength()); DeleteItemRequest deleteItemRequest = deletePointRequest.getDeleteItemRequest(); deleteItemRequest.setTableName(config.getTableName()); AttributeValue hashKeyValue = new AttributeValue().withN(String.valueOf(hashKey)); deleteItemRequest.getKey().put(config.getHashKeyAttributeName(), hashKeyValue); deleteItemRequest.getKey().put(config.getRangeKeyAttributeName(), deletePointRequest.getRangeKeyValue()); DeleteItemResult deleteItemResult = config.getDynamoDBClient().deleteItem(deleteItemRequest); DeletePointResult deletePointResult = new DeletePointResult(deleteItemResult); return deletePointResult; } }
try { final DeleteItemRequest request = new DeleteItemRequest(); request.setTableName(this.self); request.setKey(attributes); request.setReturnValues(ReturnValue.NONE);