new HashMap<String,AttributeValue>(); key_to_get.put("Name", AttributeValue.builder() .s(name) .build());
attrValues.put(":"+partition_key_name, AttributeValue.builder().s(partition_key_val).build());
new HashMap<String,AttributeValue>(); key_to_get.put("Name", AttributeValue.builder() .s(name).build());
private Map<String, AttributeValue> getKeys(String partitionKey, Optional<String> sortKey) { final Map<String, AttributeValue> key = new HashMap<>(); key.put(this.partitionKeyName, AttributeValue.builder().s(partitionKey).build()); if (sortKey.isPresent()) { key.put(this.sortKeyName.get(), AttributeValue.builder().s(sortKey.get()).build()); } return key; }
public static AttributeValue createAttributeValue(String stringValue) { if (stringValue == null || stringValue.isEmpty()) { throw new IllegalArgumentException("String attributeValues cannot be null or empty."); } return AttributeValue.builder().s(stringValue).build(); }
public static AttributeValue createAttributeValue(Collection<String> collectionValue) { if (collectionValue == null || collectionValue.isEmpty()) { throw new IllegalArgumentException("Collection attributeValues cannot be null or empty."); } return AttributeValue.builder().ss(collectionValue).build(); }
public static AttributeValue createAttributeValue(Collection<String> collectionValue) { if (collectionValue == null || collectionValue.isEmpty()) { throw new IllegalArgumentException("Collection attributeValues cannot be null or empty."); } return AttributeValue.builder().ss(collectionValue).build(); }
@Override @SafeVarargs public final Builder attributeValueList(Consumer<AttributeValue.Builder>... attributeValueList) { attributeValueList(Stream.of(attributeValueList).map(c -> AttributeValue.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; }
@Override @SafeVarargs public final Builder attributeValueList(Consumer<AttributeValue.Builder>... attributeValueList) { attributeValueList(Stream.of(attributeValueList).map(c -> AttributeValue.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; }
public static AttributeValue createAttributeValue(Long longValue) { if (longValue == null) { throw new IllegalArgumentException("Number AttributeValues cannot be null."); } return AttributeValue.builder().n(longValue.toString()).build(); }
@Override @SafeVarargs public final Builder l(Consumer<Builder>... l) { l(Stream.of(l).map(c -> AttributeValue.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; }
public static AttributeValue createAttributeValue(String stringValue) { if (stringValue == null || stringValue.isEmpty()) { throw new IllegalArgumentException("String attributeValues cannot be null or empty."); } return AttributeValue.builder().s(stringValue).build(); }
public static AttributeValue createAttributeValue(Long longValue) { if (longValue == null) { throw new IllegalArgumentException("Number AttributeValues cannot be null."); } return AttributeValue.builder().n(longValue.toString()).build(); }
@Override protected AttributeValue av(Map<String, AttributeValue> val) { return AttributeValue.builder().m(val).build(); } }
@Override protected AttributeValue av(String val) { return AttributeValue.builder().s(val).build(); }
@Override protected AttributeValue av(List<AttributeValue> val) { return AttributeValue.builder().l(val).build(); }
private GetItemResponse readFromDynamoDB(final String key, final Optional<String> sortKey) { final Map<String, AttributeValue> dynamoDBKey = new HashMap<>(); dynamoDBKey.put(this.partitionKeyName, AttributeValue.builder().s(key).build()); if (this.sortKeyName.isPresent()) { dynamoDBKey.put(this.sortKeyName.get(), AttributeValue.builder().s(sortKey.get()).build()); } final GetItemRequest getItemRequest = GetItemRequest.builder().tableName(tableName).key(dynamoDBKey) .consistentRead(true) .build(); return this.dynamoDB.getItem(getItemRequest); }
@Override protected AttributeValue av(ByteBuffer val) { return AttributeValue.builder().b(SdkBytes.fromByteBuffer(val)).build(); }