setKeySchema(keySchema); return this;
setKeySchema(new java.util.ArrayList<KeySchemaElement>(keySchema.length));
setKeySchema(keySchema);
setAttributeDefinitions(attributeDefinitions); setTableName(tableName); setKeySchema(keySchema); setProvisionedThroughput(provisionedThroughput);
setKeySchema(keySchema); return this;
setKeySchema(keySchema);
setAttributeDefinitions(attributeDefinitions); setTableName(tableName); setKeySchema(keySchema); setProvisionedThroughput(provisionedThroughput);
createTableRequest.setAttributeDefinitions(attributeDefinitions); createTableRequest.setTableName(tableName); createTableRequest.setKeySchema(keySchema); createTableRequest.setProvisionedThroughput(provisionedThroughput); return createTable(createTableRequest);
setKeySchema(keySchema); return this;
setKeySchema(new java.util.ArrayList<KeySchemaElement>(keySchema.length));
/** * Builds the necessary requests to create tables * * @param tableName * @param keySchema * @param proThrou * @param attrs * @return */ public static CreateTableRequest buildCreateTableRequest(String tableName, ArrayList<KeySchemaElement> keySchema, ProvisionedThroughput proThrou, Map<String, String> attrs) { CreateTableRequest createTableRequest = new CreateTableRequest(); createTableRequest.setTableName(tableName); createTableRequest.setKeySchema(keySchema); ArrayList<AttributeDefinition> attributeDefinitions = new ArrayList<AttributeDefinition>(); for (KeySchemaElement kEle : keySchema) { AttributeDefinition attrDef = new AttributeDefinition(); attrDef.setAttributeName(kEle.getAttributeName()); attrDef.setAttributeType(attrs.get(kEle.getAttributeName())); attributeDefinitions.add(attrDef); } createTableRequest.setAttributeDefinitions(attributeDefinitions); createTableRequest.setProvisionedThroughput(proThrou); return createTableRequest; }
setAttributeDefinitions(attributeDefinitions); setTableName(tableName); setKeySchema(keySchema); setProvisionedThroughput(provisionedThroughput);
static void createExampleTable() { // Provide the initial provisioned throughput values as Java long data types ProvisionedThroughput provisionedThroughput = new ProvisionedThroughput() .withReadCapacityUnits(5L) .withWriteCapacityUnits(6L); CreateTableRequest request = new CreateTableRequest() .withTableName(tableName) .withProvisionedThroughput(provisionedThroughput); ArrayList<AttributeDefinition> attributeDefinitions= new ArrayList<AttributeDefinition>(); attributeDefinitions.add(new AttributeDefinition().withAttributeName("Id").withAttributeType("N")); request.setAttributeDefinitions(attributeDefinitions); ArrayList<KeySchemaElement> tableKeySchema = new ArrayList<KeySchemaElement>(); tableKeySchema.add(new KeySchemaElement().withAttributeName("Id").withKeyType(KeyType.HASH)); request.setKeySchema(tableKeySchema); client.createTable(request); waitForTableToBecomeAvailable(tableName); getTableInformation(); }
createTableRequest.setAttributeDefinitions(attributes); createTableRequest.setGlobalSecondaryIndexes(globalSecondaryIndices); createTableRequest.setKeySchema(keySchema); createTableRequest.setProvisionedThroughput(provisionedThroughput);
.withKeyType(KeyType.RANGE)); createTableRequest.setKeySchema(tableKeySchema);
.withKeyType(KeyType.RANGE)); createTableRequest.setKeySchema(tableKeySchema);
request.setKeySchema(serializer.getKeySchema()); request.setAttributeDefinitions(serializer.getAttributeDefinitions());
if (json.containsKey("KeySchema")) { final Collection<KeySchemaElement> keys = this.keySchema(json); request.setKeySchema(keys);