Interface Table

All Known Implementing Classes:
ReTable

@Immutable public interface Table
Amazon DynamoDB table abstraction.

To get data from the table use frame() method. To create a new item in the table (or replace the existing one) use put(Attributes) method. For example:

 Region region = new Region.Simple(...);
 Table table = region.table("employees");
 table.put(new Attributes().with("name", "John Smith"));
 for (Item item : table.frame()) {
   System.out.println("Name: " + item.get("name").s());
 }
 table.frame()
   .where("name", Conditions.equalTo("John Smith"))
   .iterator().next().remove();
Since:
0.1
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(Map<String,software.amazon.awssdk.services.dynamodb.model.AttributeValue> attributes)
    Delete item from aws table.
    Make a new frame, in order to retrieve items.
    Get real table name.
    put(Map<String,software.amazon.awssdk.services.dynamodb.model.AttributeValue> attributes)
    Put new item there.
    Get back to the entire region.
  • Method Details

    • put

      Item put(Map<String,software.amazon.awssdk.services.dynamodb.model.AttributeValue> attributes) throws IOException
      Put new item there.

      It is recommended to use Attributes supplementary class, instead of a raw Map.

      Parameters:
      attributes - Attributes to save
      Returns:
      Item just created
      Throws:
      IOException - In case of DynamoDB failure
      See Also:
    • frame

      Frame frame()
      Make a new frame, in order to retrieve items.
      Returns:
      Frame
    • region

      Region region()
      Get back to the entire region.
      Returns:
      Region
    • name

      String name()
      Get real table name.
      Returns:
      Actual name of DynamoDB table
    • delete

      void delete(Map<String,software.amazon.awssdk.services.dynamodb.model.AttributeValue> attributes) throws IOException
      Delete item from aws table.

      It is recommended to use Attributes supplementary class, instead of a raw Map.

      Parameters:
      attributes - Attributes containing item key and value
      Throws:
      IOException - In case of DynamoDB failure
      See Also: