Interface AsyncDynamoSimplifiedClientInterface
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
AsyncDynamoSimplifiedClient
Interface for
AsyncDynamoSimplifiedClient to enable mocking and polymorphic usage.-
Method Summary
Modifier and TypeMethodDescription@NonNull AsyncCrossTableBatchGetBuilderbatchGet()Returns an async cross-table batch get builder for retrieving items from multiple tables.@NonNull AsyncCrossTableBatchWriteBuilderReturns an async cross-table batch write builder for putting/deleting items across multiple tables.voidclose()<T> @NonNull AsyncEntityTable<T> entityTable(@NonNull Class<T> entityClass) Returns anAsyncEntityTablefor the given entity class, enabling single-table design with auto-computed composite keys and discriminator filtering.@NonNull CompletableFuture<software.amazon.awssdk.services.dynamodb.model.ExecuteStatementResponse> executeStatement(@NonNull software.amazon.awssdk.services.dynamodb.model.ExecuteStatementRequest request) Executes a PartiQL statement against DynamoDB asynchronously.@NonNull software.amazon.awssdk.services.dynamodb.DynamoDbAsyncClientReturns the underlyingDynamoDbAsyncClient.@NonNull software.amazon.awssdk.enhanced.dynamodb.DynamoDbEnhancedAsyncClientReturns the underlyingDynamoDbEnhancedAsyncClient.@NonNull CompletableFuture<List<String>> Lists all DynamoDB tables asynchronously.<T> @NonNull AsyncTable<T> Returns a typedAsyncTablefor the given table name and item class.<T> @NonNull AsyncTable<T> table(@NonNull String tableName, @NonNull Class<T> itemClass, @NonNull Consumer<software.amazon.awssdk.enhanced.dynamodb.mapper.StaticTableSchema.Builder<T>> configurator) Returns a typedAsyncTablefor the given table name and item class, using aStaticTableSchemaconfigured by the provided consumer.<T> @NonNull AsyncTable<T> table(@NonNull String tableName, @NonNull software.amazon.awssdk.enhanced.dynamodb.TableSchema<T> schema) Returns a typedAsyncTablefor the given table name and custom schema.@NonNull AsyncTransactGetBuilderStarts building an async transactional read operation across one or more tables.@NonNull AsyncTransactWriteBuilderStarts building an async transactional write operation across one or more tables.
-
Method Details
-
table
Returns a typedAsyncTablefor the given table name and item class.- Type Parameters:
T- the item type- Parameters:
tableName- the name of the DynamoDB tableitemClass- the class of items stored in the table- Returns:
- an
AsyncTable<T>for the specified table
-
table
<T> @NonNull AsyncTable<T> table(@NonNull String tableName, @NonNull software.amazon.awssdk.enhanced.dynamodb.TableSchema<T> schema) Returns a typedAsyncTablefor the given table name and custom schema.- Type Parameters:
T- the item type- Parameters:
tableName- the name of the DynamoDB tableschema- the table schema defining item mapping- Returns:
- an
AsyncTable<T>for the specified table
-
table
<T> @NonNull AsyncTable<T> table(@NonNull String tableName, @NonNull Class<T> itemClass, @NonNull Consumer<software.amazon.awssdk.enhanced.dynamodb.mapper.StaticTableSchema.Builder<T>> configurator) Returns a typedAsyncTablefor the given table name and item class, using aStaticTableSchemaconfigured by the provided consumer.- Type Parameters:
T- the item type- Parameters:
tableName- the name of the DynamoDB tableitemClass- the class of items stored in the tableconfigurator- a consumer to configure theStaticTableSchema.Builder- Returns:
- an
AsyncTable<T>for the specified table
-
entityTable
Returns anAsyncEntityTablefor 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
AsyncEntityTable<T>for single-table design
-
transactGet
@NonNull AsyncTransactGetBuilder transactGet()Starts building an async transactional read operation across one or more tables.- Returns:
- an async transact get builder
-
transactWrite
@NonNull AsyncTransactWriteBuilder transactWrite()Starts building an async transactional write operation across one or more tables.- Returns:
- an async transact write builder
-
batchGet
@NonNull AsyncCrossTableBatchGetBuilder batchGet()Returns an async cross-table batch get builder for retrieving items from multiple tables.- Returns:
- an async cross-table batch get builder
-
batchWrite
@NonNull AsyncCrossTableBatchWriteBuilder batchWrite()Returns an async cross-table batch write builder for putting/deleting items across multiple tables.- Returns:
- an async cross-table batch write builder
-
getEnhancedClient
@NonNull software.amazon.awssdk.enhanced.dynamodb.DynamoDbEnhancedAsyncClient getEnhancedClient()Returns the underlyingDynamoDbEnhancedAsyncClient.- Returns:
- the enhanced async DynamoDB client
-
getDynamoDbClient
@NonNull software.amazon.awssdk.services.dynamodb.DynamoDbAsyncClient getDynamoDbClient()Returns the underlyingDynamoDbAsyncClient.- Returns:
- the DynamoDB async client
-
listTables
@NonNull CompletableFuture<List<String>> listTables()Lists all DynamoDB tables asynchronously.- Returns:
- a
CompletableFuturecontaining a list of table names
-
executeStatement
@NonNull CompletableFuture<software.amazon.awssdk.services.dynamodb.model.ExecuteStatementResponse> executeStatement(@NonNull software.amazon.awssdk.services.dynamodb.model.ExecuteStatementRequest request) Executes a PartiQL statement against DynamoDB asynchronously.- Parameters:
request- the PartiQL request to execute- Returns:
- a
CompletableFuturecontaining the response
-
close
void close()- Specified by:
closein interfaceAutoCloseable
-