Interface DynamoSimplifiedClientInterface
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
DynamoSimplifiedClient
Interface for
DynamoSimplifiedClient to enable mocking and polymorphic usage.-
Method Summary
Modifier and TypeMethodDescription@NonNull CrossTableBatchGetBuilderbatchGet()Returns a cross-table batch get builder for retrieving items from multiple tables.@NonNull CrossTableBatchWriteBuilderReturns a cross-table batch write builder for putting/deleting items across multiple tables.voidclose()@NonNull EntityQueryBuilderentityQuery(@NonNull String tableName) Starts a cross-entity query using the default_typediscriminator attribute.@NonNull EntityQueryBuilderentityQuery(@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 anEntityTablefor the given entity class, enabling single-table design with auto-computed composite keys and discriminator filtering.@NonNull software.amazon.awssdk.services.dynamodb.model.ExecuteStatementResponseexecuteStatement(@NonNull software.amazon.awssdk.services.dynamodb.model.ExecuteStatementRequest request) Executes a PartiQL statement against DynamoDB.@NonNull software.amazon.awssdk.services.dynamodb.DynamoDbClientReturns the underlyingDynamoDbClientfor advanced operations.@NonNull software.amazon.awssdk.enhanced.dynamodb.DynamoDbEnhancedClientReturns the underlyingDynamoDbEnhancedClientfor advanced operations.Lists all DynamoDB tables available to this client.<T> @NonNull Table<T> Returns a typedTablefor 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 typedTablefor the given table name and item class, using aStaticTableSchemaconfigured by the provided consumer.<T> @NonNull Table<T> table(@NonNull String tableName, @NonNull software.amazon.awssdk.enhanced.dynamodb.TableSchema<T> schema) Returns a typedTablefor the given table name and custom schema.@NonNull TransactGetBuilderStarts building a transactional read operation across one or more tables.@NonNull TransactWriteBuilderStarts building a transactional write operation across one or more tables.
-
Method Details
-
table
Returns a typedTablefor 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:
- 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 typedTablefor 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:
- 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 typedTablefor 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:
- a
Table<T>for the specified table
-
entityTable
Returns anEntityTablefor 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
Starts a cross-entity query using the default_typediscriminator 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 typesdiscriminatorAttribute- 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 underlyingDynamoDbEnhancedClientfor advanced operations.- Returns:
- the enhanced DynamoDB client
-
getDynamoDbClient
@NonNull software.amazon.awssdk.services.dynamodb.DynamoDbClient getDynamoDbClient()Returns the underlyingDynamoDbClientfor advanced operations.- Returns:
- the DynamoDB client
-
listTables
-
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:
closein interfaceAutoCloseable
-