Skip to content

Deprecated - Provides higher-level abstractions for DynamoDB using the Amazon AWS Java SDK

License

Notifications You must be signed in to change notification settings

dlvenable/dynamic-dynamo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynamic Dynamo

Provides higher-level abstractions for DynamoDB using the Amazon AWS Java SDK

Deprecated: The AWS Java SDK has much better APIs now. And using CloudFormation to create DynamoDB tables is much better.

Building Tables

One of the primary features of this project is a fluent syntax for creating DynamoDB tables.

Example

new TableBuilder()
        .name("MyGreatNewTable")
        .primary()
            .hash()
                .name("HashId").type(ScalarAttributeType.S)
            .range()
                .name("RangeId").type(ScalarAttributeType.S)
            .readCapacity(2)
            .writeCapacity(2)
            .and()
        .create(amazonDynamoDB);

Table Creator

There is also a utility function to create tables.

TableHelper.createTableIfNecessary(amazonDynamoDD, "MyGreatNewTable", new MyGreatTableDefiner());

private class MyGreatTableDefiner implements TableDefiner
{
    @Override
    public void defineTable(TableBuilder tableBuilder) {
        tableBuilder
          .primary()
              .hash()
                  .name("HashId").type(ScalarAttributeType.S)
              .range()
                  .name("RangeId").type(ScalarAttributeType.S)
              .readCapacity(2)
              .writeCapacity(2)
    }
}

Download

This project is available in Maven Central

repositories {
    mavenCentral()
}

dependencies {
    compile("io.venable.amazonaws:dynamic-dynamo:0.3")
}

About

Deprecated - Provides higher-level abstractions for DynamoDB using the Amazon AWS Java SDK

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages