Interface QueryResponse.Builder
-
- All Superinterfaces:
AwsResponse.Builder,Buildable,CopyableBuilder<QueryResponse.Builder,QueryResponse>,DynamoDbResponse.Builder,SdkBuilder<QueryResponse.Builder,QueryResponse>,SdkPojo,SdkResponse.Builder
- Enclosing class:
- QueryResponse
@Mutable @NotThreadSafe public static interface QueryResponse.Builder extends DynamoDbResponse.Builder, SdkPojo, CopyableBuilder<QueryResponse.Builder,QueryResponse>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default QueryResponse.BuilderconsumedCapacity(Consumer<ConsumedCapacity.Builder> consumedCapacity)The capacity units consumed by theQueryoperation.QueryResponse.BuilderconsumedCapacity(ConsumedCapacity consumedCapacity)The capacity units consumed by theQueryoperation.QueryResponse.Buildercount(Integer count)The number of items in the response.QueryResponse.Builderitems(Collection<? extends Map<String,AttributeValue>> items)An array of item attributes that match the query criteria.QueryResponse.Builderitems(Map<String,AttributeValue>... items)An array of item attributes that match the query criteria.QueryResponse.BuilderlastEvaluatedKey(Map<String,AttributeValue> lastEvaluatedKey)The primary key of the item where the operation stopped, inclusive of the previous result set.QueryResponse.BuilderscannedCount(Integer scannedCount)The number of items evaluated, before anyQueryFilteris applied.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.services.dynamodb.model.DynamoDbResponse.Builder
build, responseMetadata, responseMetadata
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Methods inherited from interface software.amazon.awssdk.core.SdkResponse.Builder
sdkHttpResponse, sdkHttpResponse
-
-
-
-
Method Detail
-
items
QueryResponse.Builder items(Collection<? extends Map<String,AttributeValue>> items)
An array of item attributes that match the query criteria. Each element in this array consists of an attribute name and the value for that attribute.
- Parameters:
items- An array of item attributes that match the query criteria. Each element in this array consists of an attribute name and the value for that attribute.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
items
QueryResponse.Builder items(Map<String,AttributeValue>... items)
An array of item attributes that match the query criteria. Each element in this array consists of an attribute name and the value for that attribute.
- Parameters:
items- An array of item attributes that match the query criteria. Each element in this array consists of an attribute name and the value for that attribute.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
count
QueryResponse.Builder count(Integer count)
The number of items in the response.
If you used a
QueryFilterin the request, thenCountis the number of items returned after the filter was applied, andScannedCountis the number of matching items before the filter was applied.If you did not use a filter in the request, then
CountandScannedCountare the same.- Parameters:
count- The number of items in the response.If you used a
QueryFilterin the request, thenCountis the number of items returned after the filter was applied, andScannedCountis the number of matching items before the filter was applied.If you did not use a filter in the request, then
CountandScannedCountare the same.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
scannedCount
QueryResponse.Builder scannedCount(Integer scannedCount)
The number of items evaluated, before any
QueryFilteris applied. A highScannedCountvalue with few, or no,Countresults indicates an inefficientQueryoperation. For more information, see Count and ScannedCount in the Amazon DynamoDB Developer Guide.If you did not use a filter in the request, then
ScannedCountis the same asCount.- Parameters:
scannedCount- The number of items evaluated, before anyQueryFilteris applied. A highScannedCountvalue with few, or no,Countresults indicates an inefficientQueryoperation. For more information, see Count and ScannedCount in the Amazon DynamoDB Developer Guide.If you did not use a filter in the request, then
ScannedCountis the same asCount.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
lastEvaluatedKey
QueryResponse.Builder lastEvaluatedKey(Map<String,AttributeValue> lastEvaluatedKey)
The primary key of the item where the operation stopped, inclusive of the previous result set. Use this value to start a new operation, excluding this value in the new request.
If
LastEvaluatedKeyis empty, then the "last page" of results has been processed and there is no more data to be retrieved.If
LastEvaluatedKeyis not empty, it does not necessarily mean that there is more data in the result set. The only way to know when you have reached the end of the result set is whenLastEvaluatedKeyis empty.- Parameters:
lastEvaluatedKey- The primary key of the item where the operation stopped, inclusive of the previous result set. Use this value to start a new operation, excluding this value in the new request.If
LastEvaluatedKeyis empty, then the "last page" of results has been processed and there is no more data to be retrieved.If
LastEvaluatedKeyis not empty, it does not necessarily mean that there is more data in the result set. The only way to know when you have reached the end of the result set is whenLastEvaluatedKeyis empty.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
consumedCapacity
QueryResponse.Builder consumedCapacity(ConsumedCapacity consumedCapacity)
The capacity units consumed by the
Queryoperation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation.ConsumedCapacityis only returned if theReturnConsumedCapacityparameter was specified. For more information, see Capacity unit consumption for read operations in the Amazon DynamoDB Developer Guide.- Parameters:
consumedCapacity- The capacity units consumed by theQueryoperation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation.ConsumedCapacityis only returned if theReturnConsumedCapacityparameter was specified. For more information, see Capacity unit consumption for read operations in the Amazon DynamoDB Developer Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
consumedCapacity
default QueryResponse.Builder consumedCapacity(Consumer<ConsumedCapacity.Builder> consumedCapacity)
The capacity units consumed by the
This is a convenience method that creates an instance of theQueryoperation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation.ConsumedCapacityis only returned if theReturnConsumedCapacityparameter was specified. For more information, see Capacity unit consumption for read operations in the Amazon DynamoDB Developer Guide.ConsumedCapacity.Builderavoiding the need to create one manually viaConsumedCapacity.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toconsumedCapacity(ConsumedCapacity).- Parameters:
consumedCapacity- a consumer that will call methods onConsumedCapacity.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
consumedCapacity(ConsumedCapacity)
-
-