java.lang.Object
software.amazon.awssdk.enhanced.dynamodb.model.ReadBatch

@ThreadSafe public final class ReadBatch extends Object
Defines a collection of primary keys for items in a table, stored as KeysAndAttributes, and used for the batchGetItem() operation (such as DynamoDbEnhancedClient.batchGetItem(BatchGetItemEnhancedRequest)) as part of a BatchGetItemEnhancedRequest.

A valid request object should contain one or more primary keys.

  • Method Details

    • builder

      public static <T> ReadBatch.Builder<T> builder(Class<? extends T> itemClass)
      Creates a newly initialized builder for a read batch.
      Type Parameters:
      T - The type of the modelled object, corresponding to itemClass
      Parameters:
      itemClass - the class that items in this table map to
      Returns:
      a ReadBatch builder
    • tableName

      public String tableName()
      Returns the table name associated with this batch.
    • keysAndAttributes

      public KeysAndAttributes keysAndAttributes()
      Returns the collection of keys and attributes, see KeysAndAttributes, in this read batch.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object