/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package software.amazon.awssdk.enhanced.dynamodb; import java.util.function.Consumer; import software.amazon.awssdk.annotations.SdkPublicApi; import software.amazon.awssdk.annotations.ThreadSafe; import software.amazon.awssdk.core.pagination.sync.SdkIterable; import software.amazon.awssdk.enhanced.dynamodb.model.Page; import software.amazon.awssdk.enhanced.dynamodb.model.QueryConditional; import software.amazon.awssdk.enhanced.dynamodb.model.QueryEnhancedRequest; import software.amazon.awssdk.enhanced.dynamodb.model.ScanEnhancedRequest; /** * Synchronous interface for running commands against an object that is linked to a specific DynamoDb secondary index * and knows how to map records from the table that index is linked to into a modelled object. *
* By default, all command methods throw an {@link UnsupportedOperationException} to prevent interface extensions from breaking
* implementing classes.
*
* @param
* The result is accessed through iterable pages (see {@link Page}) in an interactive way; each time a
* result page is retrieved, a query call is made to DynamoDb to get those entries. If no matches are found,
* the resulting iterator will contain an empty page. Results are sorted by sort key value in
* ascending order by default; this behavior can be overridden in the {@link QueryEnhancedRequest}.
*
* The additional configuration parameters that the enhanced client supports are defined
* in the {@link QueryEnhancedRequest}.
*
* This operation calls the low-level DynamoDB API Query operation. Consult the Query documentation for
* further details and constraints.
*
* Example:
*
* The result is accessed through iterable pages (see {@link Page}) in an interactive way; each time a
* result page is retrieved, a query call is made to DynamoDb to get those entries. If no matches are found,
* the resulting iterator will contain an empty page. Results are sorted by sort key value in
* ascending order by default; this behavior can be overridden in the {@link QueryEnhancedRequest}.
*
* The additional configuration parameters that the enhanced client supports are defined
* in the {@link QueryEnhancedRequest}.
*
* This operation calls the low-level DynamoDB API Query operation. Consult the Query documentation for
* further details and constraints.
*
* Note: This is a convenience method that creates an instance of the request builder avoiding the need to create one
* manually via {@link QueryEnhancedRequest#builder()}.
*
* Example:
*
* The result is accessed through iterable pages (see {@link Page}) in an interactive way; each time a
* result page is retrieved, a query call is made to DynamoDb to get those entries. If no matches are found,
* the resulting iterator will contain an empty page. Results are sorted by sort key value in
* ascending order.
*
* This operation calls the low-level DynamoDB API Query operation. Consult the Query documentation for
* further details and constraints.
*
* Example:
*
* The result is accessed through iterable pages (see {@link Page}) in an interactive way; each time a
* result page is retrieved, a scan call is made to DynamoDb to get those entries. If no matches are found,
* the resulting iterator will contain an empty page.
*
* The additional configuration parameters that the enhanced client supports are defined
* in the {@link ScanEnhancedRequest}.
*
* Example:
*
* The result is accessed through iterable pages (see {@link Page}) in an interactive way; each time a
* result page is retrieved, a scan call is made to DynamoDb to get those entries. If no matches are found,
* the resulting iterator will contain an empty page.
*
* The additional configuration parameters that the enhanced client supports are defined
* in the {@link ScanEnhancedRequest}.
*
* Note: This is a convenience method that creates an instance of the request builder avoiding the need to create one
* manually via {@link ScanEnhancedRequest#builder()}.
*
* Example:
*
* The result is accessed through iterable pages (see {@link Page}) in an interactive way; each time a
* result page is retrieved, a scan call is made to DynamoDb to get those entries. If no matches are found,
* the resulting iterator will contain an empty page.
*
* Example:
*
* {@code
*
* QueryConditional queryConditional = QueryConditional.keyEqualTo(Key.builder().partitionValue("id-value").build());
* Iterator
*
* @param request A {@link QueryEnhancedRequest} defining the query conditions and how
* to handle the results.
* @return an iterator of type {@link SdkIterable} with paginated results (see {@link Page}).
*/
default SdkIterable
* {@code
*
* Iterator
*
* @param requestConsumer A {@link Consumer} of {@link QueryEnhancedRequest} defining the query conditions and how to
* handle the results.
* @return an iterator of type {@link SdkIterable} with paginated results (see {@link Page}).
*/
default SdkIterable
* {@code
*
* Iterator
*
* @param queryConditional A {@link QueryConditional} defining the matching criteria for records to be queried.
* @return an iterator of type {@link SdkIterable} with paginated results (see {@link Page}).
*/
default SdkIterable
* {@code
*
* Iterator
*
* @param request A {@link ScanEnhancedRequest} defining how to handle the results.
* @return an iterator of type {@link SdkIterable} with paginated results (see {@link Page}).
*/
default SdkIterable
* {@code
*
* Iterator
*
* @param requestConsumer A {@link Consumer} of {@link ScanEnhancedRequest} defining the query conditions and how to
* handle the results.
* @return an iterator of type {@link SdkIterable} with paginated results (see {@link Page}).
*/
default SdkIterable
* {@code
*
* Iterator
*
* @return an iterator of type {@link SdkIterable} with paginated results (see {@link Page}).
*/
default SdkIterable