List of usage examples for com.amazonaws.services.dynamodbv2.document Table putItem
@Override
public PutItemOutcome putItem(PutItemSpec spec)
From source file:org.kmbmicro.chatwebsocket.DbString.java
public static void createItems(ChatData chatData) { Table table = dynamoDB.getTable(tableName); System.out.println(table.getTableName()); try {//from www .j ava 2s. co m Item item = new Item().withPrimaryKey("TimeStamp", dateNow()).withString("user", chatData.getUser()) .withString("chat", chatData.getChat()); table.putItem(item); } catch (Exception e) { System.err.println("Create items failed."); System.err.println(e.getMessage()); } }