Class QueryEnhancedRequest

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

@ThreadSafe public final class QueryEnhancedRequest extends Object
Defines parameters used to when querying a DynamoDb table or index using the query() operation (such as DynamoDbTable.query(QueryEnhancedRequest) or DynamoDbAsyncIndex.query(QueryEnhancedRequest)).

A valid request object must contain a QueryConditional condition specifying how DynamoDb should match items in the table.

All other parameters are optional.

  • Method Details

    • builder

      public static QueryEnhancedRequest.Builder builder()
      Creates a newly initialized builder for a request object.
    • toBuilder

      public QueryEnhancedRequest.Builder toBuilder()
      Returns a builder initialized with all existing values on the request object.
    • queryConditional

      public QueryConditional queryConditional()
      Returns the matching condition of the query.
    • exclusiveStartKey

      public Map<String,AttributeValue> exclusiveStartKey()
      Returns the value of the exclusive start key set on this request object, or null if it doesn't exist.
    • scanIndexForward

      public Boolean scanIndexForward()
      Returns the value of scan index forward, meaning an ascending result sort order, or true if it has not been set.
    • limit

      public Integer limit()
      Returns the value of limit set on this request object, or null if it doesn't exist.
    • consistentRead

      public Boolean consistentRead()
      Returns the value of consistent read, or false if it has not been set.
    • filterExpression

      public Expression filterExpression()
      Returns the return result filter Expression set on this request object, or null if it doesn't exist.
    • attributesToProject

      public List<String> attributesToProject()
      Returns the list of projected attributes on this request object, or an null if no projection is specified. Nested attributes are represented using the '.' separator. Example : foo.bar is represented as "foo.bar" which is indistinguishable from a non-nested attribute with the name "foo.bar". Use nestedAttributesToProject() if you have a use-case that requires discrimination between these two cases.
    • nestedAttributesToProject

      public List<NestedAttributeName> nestedAttributesToProject()
      Returns the list of projected attribute names, in the form of NestedAttributeName objects, for this request object, or null if no projection is specified. Refer NestedAttributeName .
    • returnConsumedCapacity

      public ReturnConsumedCapacity returnConsumedCapacity()
      Whether to return the capacity consumed by this operation.
      See Also:
    • returnConsumedCapacityAsString

      public String returnConsumedCapacityAsString()
      Whether to return the capacity consumed by this operation.

      Similar to returnConsumedCapacity() but return the value as a string. This is useful in situations where the value is not defined in ReturnConsumedCapacity.

    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object