Example usage for com.amazonaws.services.dynamodbv2.document TableWriteItems withPrimaryKeysToDelete

List of usage examples for com.amazonaws.services.dynamodbv2.document TableWriteItems withPrimaryKeysToDelete

Introduction

In this page you can find the example usage for com.amazonaws.services.dynamodbv2.document TableWriteItems withPrimaryKeysToDelete.

Prototype

public TableWriteItems withPrimaryKeysToDelete(PrimaryKey... primaryKeysToDelete) 

Source Link

Document

Used to specify multiple primary keys to be deleted from the current table.

Usage

From source file:org.chodavarapu.jgitaws.repositories.PackDescriptionRepository.java

License:Eclipse Distribution License

private TableWriteItems createBatchRequest(List<PackDescriptionOperation> operations) {
    List<Item> itemsToPut = createItemsToPutList(operations);
    List<PrimaryKey> keysToDelete = createKeysToDeleteList(operations);

    TableWriteItems request = new TableWriteItems(configuration.getPackDescriptionsTableName());

    if (itemsToPut.size() > 0) {
        request.withItemsToPut(itemsToPut);
    }/*from   w  w w  . j  a v a2s.c o  m*/

    if (keysToDelete.size() > 0) {
        request.withPrimaryKeysToDelete(keysToDelete.toArray(new PrimaryKey[keysToDelete.size()]));
    }

    return request;
}