if (e instanceof String) { Set<String> set = getStringSet(attrName); withStringSet(attrName, set); converted = true; break; withStringSet(attrName, set);
@SuppressWarnings("unchecked") Set<String> ss = (Set<String>)val; return withStringSet(attrName, ss); @SuppressWarnings("unchecked") Set<String> ss = (Set<String>)val; return withStringSet(attrName, ss);
private static void uploadProduct(String tableName, int productIndex) { Table table = dynamoDB.getTable(tableName); try { System.out.println("Processing record #" + productIndex); Item item = new Item() .withPrimaryKey("Id", productIndex) .withString("Title", "Book " + productIndex + " Title") .withString("ISBN", "111-1111111111") .withStringSet( "Authors", new HashSet<String>(Arrays.asList("Author1"))) .withNumber("Price", 2) .withString("Dimensions", "8.5 x 11.0 x 0.5") .withNumber("PageCount", 500) .withBoolean("InPublication", true) .withString("ProductCategory", "Book"); table.putItem(item); } catch (Exception e) { System.err.println("Failed to create item " + productIndex + " in " + tableName); System.err.println(e.getMessage()); } }
.withNumber("Replies", 0) .withNumber("Answered", 0) .withStringSet( "Tags", new HashSet<String>( Arrays.asList("index", "primarykey", "table"))); table.putItem(item); .withNumber("Replies", 0) .withNumber("Answered", 0) .withStringSet( "Tags", new HashSet<String>( Arrays.asList("index", "primarykey", "rangekey"))); table.putItem(item); .withNumber("Replies", 0) .withNumber("Answered", 0) .withStringSet( "Tags", new HashSet<String>( Arrays.asList("largeobjects", "multipart upload"))); table.putItem(item);
.withNumber("Replies", 0) .withNumber("Answered", 0) .withStringSet( "Tags", new HashSet<String>( Arrays.asList("index", "primarykey", "table"))); table.putItem(item); .withNumber("Replies", 0) .withNumber("Answered", 0) .withStringSet( "Tags", new HashSet<String>( Arrays.asList("index", "primarykey", "rangekey"))); table.putItem(item); .withNumber("Replies", 0) .withNumber("Answered", 0) .withStringSet( "Tags", new HashSet<String>( Arrays.asList("largeobjects", "multipart upload"))); table.putItem(item);
if (e instanceof String) { Set<String> set = getStringSet(attrName); withStringSet(attrName, set); converted = true; break; withStringSet(attrName, set);
@SuppressWarnings("unchecked") Set<String> ss = (Set<String>)val; return withStringSet(attrName, ss); @SuppressWarnings("unchecked") Set<String> ss = (Set<String>)val; return withStringSet(attrName, ss);
.withPrimaryKey("ForumName","Amazon RDS","Subject","Amazon RDS Thread 1") .withString("Message", "ElasticCache Thread 1 message") .withStringSet("Tags", new HashSet<String>( Arrays.asList("cache", "in-memory")))) .withHashAndRangeKeysToDelete("ForumName","Subject", "Amazon S3", "S3 Thread 100");
.withString("Title", "Book 120 Title") .withString("ISBN", "120-1111111111") .withStringSet( "Authors", new HashSet<String>(Arrays.asList("Author12", "Author22"))) .withNumber("Price", 20) .withString("Title", "Book 121 Title") .withString("ISBN", "121-1111111111") .withStringSet( "Authors", new HashSet<String>(Arrays.asList("Author21", "Author 22"))) .withNumber("Price", 20)
.withString("Title", "Book 101 Title") .withString("ISBN", "111-1111111111") .withStringSet("Authors", new HashSet<String>(Arrays.asList("Author1"))) .withNumber("Price", 2) .withString("Title", "Book 102 Title") .withString("ISBN", "222-2222222222") .withStringSet("Authors", new HashSet<String>( Arrays.asList("Author1", "Author2"))) .withNumber("Price", 20) .withString("Title", "Book 103 Title") .withString("ISBN", "333-3333333333") .withStringSet( "Authors", new HashSet<String>( Arrays.asList("Author1", "Author2"))) .withStringSet("Color", new HashSet<String>( Arrays.asList("Red", "Black"))) .withString("ProductCategory", "Bicycle"); .withNumber("Price", 200) .withString("Gender", "M") .withStringSet("Color", new HashSet<String>( Arrays.asList("Green", "Black"))) .withString("ProductCategory", "Bicycle"); .withStringSet( "Color", new HashSet<String>( Arrays.asList("Red", "Green", "Black")))
.withString("Title", "Book 101 Title") .withString("ISBN", "111-1111111111") .withStringSet("Authors", new HashSet<String>( Arrays.asList("Author1"))) .withNumber("Price", 2) .withString("Title", "Book 102 Title") .withString("ISBN", "222-2222222222") .withStringSet( "Authors", new HashSet<String>( Arrays.asList("Author1", "Author2"))) .withNumber("Price", 20) .withString("Title", "Book 103 Title") .withString("ISBN", "333-3333333333") .withStringSet( "Authors", new HashSet<String>( Arrays.asList("Author1", "Author2"))) .withStringSet("Color", new HashSet<String>( Arrays.asList("Red", "Black"))) .withString("ProductCategory", "Bicycle"); .withNumber("Price", 200) .withString("Gender", "M") .withStringSet( "Color", new HashSet<String>( Arrays.asList("Green", "Black"))) .withString("ProductCategory", "Bicycle"); .withStringSet( "Color", new HashSet<String>( Arrays.asList("Red", "Green", "Black")))