Example usage for com.amazonaws.services.dynamodbv2.document.spec DeleteItemSpec withPrimaryKey

List of usage examples for com.amazonaws.services.dynamodbv2.document.spec DeleteItemSpec withPrimaryKey

Introduction

In this page you can find the example usage for com.amazonaws.services.dynamodbv2.document.spec DeleteItemSpec withPrimaryKey.

Prototype

@Override
    public DeleteItemSpec withPrimaryKey(PrimaryKey primaryKey) 

Source Link

Usage

From source file:com.exorath.service.party.service.DynamoDatabaseProvider.java

License:Apache License

/**
 * Removes a party from the database using its party_uuid
 *
 * @param uuid The party unique id// www .j av  a 2s. c o m
 */
public void removeParty(String uuid) {
    if (getPartyFromId(uuid) != null) {
        DeleteItemSpec deleteItemSpec = new DeleteItemSpec();
        deleteItemSpec.withPrimaryKey(new KeyAttribute(PARTY_UUID, uuid));
        table.deleteItem(deleteItemSpec);
    }
}