Interface DynamoSimplifiedClientInterface

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
DynamoSimplifiedClient

public interface DynamoSimplifiedClientInterface extends AutoCloseable
Interface for DynamoSimplifiedClient to enable mocking and polymorphic usage.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a cross-table batch get builder for retrieving items from multiple tables.
    Returns a cross-table batch write builder for putting/deleting items across multiple tables.
    void
     
    entityQuery(@NonNull String tableName)
    Starts a cross-entity query using the default _type discriminator attribute.
    entityQuery(@NonNull String tableName, @NonNull String discriminatorAttribute)
    Starts a cross-entity query using a custom discriminator attribute.
    <T> @NonNull EntityTable<T>
    entityTable(@NonNull Class<T> entityClass)
    Returns an EntityTable for the given entity class, enabling single-table design with auto-computed composite keys and discriminator filtering.
    @NonNull software.amazon.awssdk.services.dynamodb.model.ExecuteStatementResponse
    executeStatement(@NonNull software.amazon.awssdk.services.dynamodb.model.ExecuteStatementRequest request)
    Executes a PartiQL statement against DynamoDB.
    @NonNull software.amazon.awssdk.services.dynamodb.DynamoDbClient
    Returns the underlying DynamoDbClient for advanced operations.
    @NonNull software.amazon.awssdk.enhanced.dynamodb.DynamoDbEnhancedClient
    Returns the underlying DynamoDbEnhancedClient for advanced operations.
    @NonNull List<String>
    Lists all DynamoDB tables available to this client.
    <T> @NonNull Table<T>
    table(@NonNull String tableName, @NonNull Class<T> itemClass)
    Returns a typed Table for the given table name and item class.
    <T> @NonNull Table<T>
    table(@NonNull String tableName, @NonNull Class<T> itemClass, @NonNull Consumer<software.amazon.awssdk.enhanced.dynamodb.mapper.StaticTableSchema.Builder<T>> configurator)
    Returns a typed Table for the given table name and item class, using a StaticTableSchema configured by the provided consumer.
    <T> @NonNull Table<T>
    table(@NonNull String tableName, @NonNull software.amazon.awssdk.enhanced.dynamodb.TableSchema<T> schema)
    Returns a typed Table for the given table name and custom schema.
    Starts building a transactional read operation across one or more tables.
    Starts building a transactional write operation across one or more tables.
  • Method Details

    • table

      <T> @NonNull Table<T> table(@NonNull String tableName, @NonNull Class<T> itemClass)
      Returns a typed Table for the given table name and item class.
      Type Parameters:
      T - the item type
      Parameters:
      tableName - the name of the DynamoDB table
      itemClass - the class of items stored in the table
      Returns:
      a Table<T> for the specified table
    • table

      <T> @NonNull Table<T> table(@NonNull String tableName, @NonNull software.amazon.awssdk.enhanced.dynamodb.TableSchema<T> schema)
      Returns a typed Table for the given table name and custom schema.
      Type Parameters:
      T - the item type
      Parameters:
      tableName - the name of the DynamoDB table
      schema - the table schema defining item mapping
      Returns:
      a Table<T> for the specified table
    • table

      <T> @NonNull Table<T> table(@NonNull String tableName, @NonNull Class<T> itemClass, @NonNull Consumer<software.amazon.awssdk.enhanced.dynamodb.mapper.StaticTableSchema.Builder<T>> configurator)
      Returns a typed Table for the given table name and item class, using a StaticTableSchema configured by the provided consumer.
      Type Parameters:
      T - the item type
      Parameters:
      tableName - the name of the DynamoDB table
      itemClass - the class of items stored in the table
      configurator - a consumer to configure the StaticTableSchema.Builder
      Returns:
      a Table<T> for the specified table
    • entityTable

      <T> @NonNull EntityTable<T> entityTable(@NonNull Class<T> entityClass)
      Returns an EntityTable for the given entity class, enabling single-table design with auto-computed composite keys and discriminator filtering.
      Type Parameters:
      T - the entity type
      Parameters:
      entityClass - the entity class annotated with @Entity
      Returns:
      an EntityTable<T> for single-table design
    • entityQuery

      @NonNull EntityQueryBuilder entityQuery(@NonNull String tableName)
      Starts a cross-entity query using the default _type discriminator attribute.
      Parameters:
      tableName - the DynamoDB table shared by the entity types
      Returns:
      a cross-entity query builder
    • entityQuery

      @NonNull EntityQueryBuilder entityQuery(@NonNull String tableName, @NonNull String discriminatorAttribute)
      Starts a cross-entity query using a custom discriminator attribute.
      Parameters:
      tableName - the DynamoDB table shared by the entity types
      discriminatorAttribute - the attribute containing each entity's discriminator
      Returns:
      a cross-entity query builder
    • transactGet

      @NonNull TransactGetBuilder transactGet()
      Starts building a transactional read operation across one or more tables.
      Returns:
      a transact get builder
    • transactWrite

      @NonNull TransactWriteBuilder transactWrite()
      Starts building a transactional write operation across one or more tables.
      Returns:
      a transact write builder
    • batchGet

      @NonNull CrossTableBatchGetBuilder batchGet()
      Returns a cross-table batch get builder for retrieving items from multiple tables.
      Returns:
      a cross-table batch get builder
    • batchWrite

      @NonNull CrossTableBatchWriteBuilder batchWrite()
      Returns a cross-table batch write builder for putting/deleting items across multiple tables.
      Returns:
      a cross-table batch write builder
    • getEnhancedClient

      @NonNull software.amazon.awssdk.enhanced.dynamodb.DynamoDbEnhancedClient getEnhancedClient()
      Returns the underlying DynamoDbEnhancedClient for advanced operations.
      Returns:
      the enhanced DynamoDB client
    • getDynamoDbClient

      @NonNull software.amazon.awssdk.services.dynamodb.DynamoDbClient getDynamoDbClient()
      Returns the underlying DynamoDbClient for advanced operations.
      Returns:
      the DynamoDB client
    • listTables

      @NonNull List<String> listTables()
      Lists all DynamoDB tables available to this client.
      Returns:
      a list of DynamoDB table names
    • executeStatement

      @NonNull software.amazon.awssdk.services.dynamodb.model.ExecuteStatementResponse executeStatement(@NonNull software.amazon.awssdk.services.dynamodb.model.ExecuteStatementRequest request)
      Executes a PartiQL statement against DynamoDB.
      Parameters:
      request - the PartiQL request to execute
      Returns:
      the response from DynamoDB
    • close

      void close()
      Specified by:
      close in interface AutoCloseable