Class UpdateBuilder<T>

java.lang.Object
dev.hogwai.dynamodb.simplified.builder.base.AbstractUpdateBuilder<T, UpdateBuilder<T>>
dev.hogwai.dynamodb.simplified.builder.UpdateBuilder<T>
Type Parameters:
T - the type of the item

public class UpdateBuilder<T> extends AbstractUpdateBuilder<T, UpdateBuilder<T>>
A fluent builder for updating an item in a DynamoDB table. Supports both full-item replacement and partial updates via an UpdateExpression. Part of the DynamoDB Simplified library.
  • Constructor Details

    • UpdateBuilder

      public UpdateBuilder(@NonNull software.amazon.awssdk.enhanced.dynamodb.DynamoDbTable<T> table, @NonNull T item, @NonNull software.amazon.awssdk.services.dynamodb.DynamoDbClient dynamoDbClient)
      Constructs a new UpdateBuilder for the given table and item.
      Parameters:
      table - the DynamoDB table
      item - the item to update (full replacement data, or a template object when used with AbstractUpdateBuilder.update(java.util.function.Consumer))
      dynamoDbClient - the low-level DynamoDB client (required for partial updates)
    • UpdateBuilder

      public UpdateBuilder(@NonNull software.amazon.awssdk.enhanced.dynamodb.DynamoDbTable<T> table, @NonNull software.amazon.awssdk.services.dynamodb.DynamoDbClient dynamoDbClient, @NonNull Object partitionKey, @Nullable Object sortKey)
      Key-only constructor for use from Table convenience methods. Skips the item parameter and builds the key map directly from partition (and optionally sort) key values.
      Parameters:
      table - the DynamoDB table
      dynamoDbClient - the low-level DynamoDB client (required for partial updates)
      partitionKey - the partition key value
      sortKey - the sort key value, or null if the table has no sort key
  • Method Details