/** * Constructs a new DeleteRequest object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param key * A map of attribute name to attribute values, representing the primary key of the item to delete. All of * the table's primary key attributes must be specified, and their data types must match those of the table's * key schema. */ public DeleteRequest(java.util.Map<String, AttributeValue> key) { setKey(key); }
/** * <p> * A map of attribute name to attribute values, representing the primary key of the item to delete. All of the * table's primary key attributes must be specified, and their data types must match those of the table's key * schema. * </p> * * @param key * A map of attribute name to attribute values, representing the primary key of the item to delete. All of * the table's primary key attributes must be specified, and their data types must match those of the table's * key schema. * @return Returns a reference to this object so that method calls can be chained together. */ public DeleteRequest withKey(java.util.Map<String, AttributeValue> key) { setKey(key); return this; }
/** * Set the hash and range key attributes of the item. * <p> * For a hash-only table, you only need to provide the hash attribute. For a hash-and-range table, you must provide * both. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param hashKey * a map entry including the name and value of the primary hash key. * @param rangeKey * a map entry including the name and value of the primary range key, or null if it is a hash-only table. */ public DeleteRequest withKey(java.util.Map.Entry<String, AttributeValue> hashKey, java.util.Map.Entry<String, AttributeValue> rangeKey) throws IllegalArgumentException { setKey(hashKey, rangeKey); return this; }
/** * Set the hash and range key attributes of the item. * <p> * For a hash-only table, you only need to provide the hash attribute. For a hash-and-range table, you must provide * both. * * @param hashKey * a map entry including the name and value of the primary hash key. * @param rangeKey * a map entry including the name and value of the primary range key, or null if it is a hash-only table. */ public void setKey(java.util.Map.Entry<String, AttributeValue> hashKey, java.util.Map.Entry<String, AttributeValue> rangeKey) throws IllegalArgumentException { java.util.HashMap<String, AttributeValue> key = new java.util.HashMap<String, AttributeValue>(); if (hashKey != null) { key.put(hashKey.getKey(), hashKey.getValue()); } else { throw new IllegalArgumentException("hashKey must be non-null object."); } if (rangeKey != null) { key.put(rangeKey.getKey(), rangeKey.getValue()); } setKey(key); }
/** * Constructs a new DeleteRequest object. Callers should use the setter or * fluent setter (with...) methods to initialize any additional object * members. * * @param key <p> * A map of attribute name to attribute values, representing the * primary key of the item to delete. All of the table's primary * key attributes must be specified, and their data types must * match those of the table's key schema. * </p> */ public DeleteRequest(java.util.Map<String, AttributeValue> key) { setKey(key); }
public DeleteRequest unmarshall(JsonUnmarshallerContext context) throws Exception { DeleteRequest deleteRequest = new DeleteRequest(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return null; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("Key", targetDepth)) { context.nextToken(); deleteRequest.setKey(new MapUnmarshaller<String, AttributeValue>(context.getUnmarshaller(String.class), AttributeValueJsonUnmarshaller .getInstance()).unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return deleteRequest; }
/** * Constructs a new DeleteRequest object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param key * A map of attribute name to attribute values, representing the primary key of the item to delete. All of * the table's primary key attributes must be specified, and their data types must match those of the table's * key schema. */ public DeleteRequest(java.util.Map<String, AttributeValue> key) { setKey(key); }
/** * <p> * A map of attribute name to attribute values, representing the primary key of the item to delete. All of the * table's primary key attributes must be specified, and their data types must match those of the table's key * schema. * </p> * * @param key * A map of attribute name to attribute values, representing the primary key of the item to delete. All of * the table's primary key attributes must be specified, and their data types must match those of the table's * key schema. * @return Returns a reference to this object so that method calls can be chained together. */ public DeleteRequest withKey(java.util.Map<String, AttributeValue> key) { setKey(key); return this; }
/** * Set the hash and range key attributes of the item. * <p> * For a hash-only table, you only need to provide the hash attribute. For a hash-and-range table, you must provide * both. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param hashKey * a map entry including the name and value of the primary hash key. * @param rangeKey * a map entry including the name and value of the primary range key, or null if it is a hash-only table. */ public DeleteRequest withKey(java.util.Map.Entry<String, AttributeValue> hashKey, java.util.Map.Entry<String, AttributeValue> rangeKey) throws IllegalArgumentException { setKey(hashKey, rangeKey); return this; }
public DeleteRequest unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } DeleteRequest deleteRequest = new DeleteRequest(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Key")) { deleteRequest.setKey(new MapUnmarshaller<AttributeValue>( AttributeValueJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return deleteRequest; }
/** * Set the hash and range key attributes of the item. * <p> * For a hash-only table, you only need to provide the hash attribute. For a hash-and-range table, you must provide * both. * * @param hashKey * a map entry including the name and value of the primary hash key. * @param rangeKey * a map entry including the name and value of the primary range key, or null if it is a hash-only table. */ public void setKey(java.util.Map.Entry<String, AttributeValue> hashKey, java.util.Map.Entry<String, AttributeValue> rangeKey) throws IllegalArgumentException { java.util.HashMap<String, AttributeValue> key = new java.util.HashMap<String, AttributeValue>(); if (hashKey != null) { key.put(hashKey.getKey(), hashKey.getValue()); } else { throw new IllegalArgumentException("hashKey must be non-null object."); } if (rangeKey != null) { key.put(rangeKey.getKey(), rangeKey.getValue()); } setKey(key); }
public DeleteRequest unmarshall(JsonUnmarshallerContext context) throws Exception { DeleteRequest deleteRequest = new DeleteRequest(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return null; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("Key", targetDepth)) { context.nextToken(); deleteRequest.setKey(new MapUnmarshaller<String, AttributeValue>(context.getUnmarshaller(String.class), AttributeValueJsonUnmarshaller .getInstance()).unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return deleteRequest; }