List of usage examples for com.amazonaws.services.dynamodbv2.model DeleteItemRequest DeleteItemRequest
public DeleteItemRequest(String tableName, java.util.Map<String, AttributeValue> key)
From source file:com.erudika.para.persistence.AWSDynamoDAO.java
License:Apache License
private void deleteRow(String key, String appid) { if (StringUtils.isBlank(key) || StringUtils.isBlank(appid)) { return;/*from w w w . j av a 2s . c om*/ } try { DeleteItemRequest delItemRequest = new DeleteItemRequest(getTableNameForAppid(appid), Collections.singletonMap(Config._KEY, new AttributeValue(getKeyForAppid(key, appid)))); client().deleteItem(delItemRequest); } catch (Exception e) { logger.error("Could not delete row from DB - appid={}, key={}", appid, key, e); } }
From source file:com.tsatsatzu.subwar.game.logic.dynamo.DynamoIODriver.java
License:Apache License
@Override public void deleteUser(String id) { Map<String, AttributeValue> key = new HashMap<>(); key.put(USER_PRIMARY_KEY, new AttributeValue().withS(id)); DeleteItemRequest request = new DeleteItemRequest(USER_TABLE_NAME, key); mClient.deleteItem(request);//from w w w. j a va2 s . c om }
From source file:org.iternine.jeppetto.dao.dynamodb.DynamoDBQueryModelDAO.java
License:Apache License
private void deleteItem(Map<String, AttributeValue> key) { try {/*from w w w. j a va 2s. c om*/ dynamoDB.deleteItem(new DeleteItemRequest(tableName, key)); } catch (Exception e) { throw new JeppettoException(e); } }