Class QueryOperation<T>
- java.lang.Object
-
- software.amazon.awssdk.enhanced.dynamodb.internal.operations.QueryOperation<T>
-
- All Implemented Interfaces:
PaginatedIndexOperation<T,QueryRequest,QueryResponse>
,PaginatedOperation<T,QueryRequest,QueryResponse>
,PaginatedTableOperation<T,QueryRequest,QueryResponse>
public class QueryOperation<T> extends Object implements PaginatedTableOperation<T,QueryRequest,QueryResponse>, PaginatedIndexOperation<T,QueryRequest,QueryResponse>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Function<QueryRequest,SdkPublisher<QueryResponse>>
asyncServiceCall(DynamoDbAsyncClient dynamoDbAsyncClient)
Provides a function for making the low level non-blocking asynchronous SDK call to DynamoDb.static <T> QueryOperation<T>
create(QueryEnhancedRequest request)
QueryRequest
generateRequest(TableSchema<T> tableSchema, OperationContext operationContext, DynamoDbEnhancedClientExtension extension)
This method generates the request that needs to be sent to a low levelDynamoDbClient
.OperationName
operationName()
The type, or name, of the operation.Function<QueryRequest,SdkIterable<QueryResponse>>
serviceCall(DynamoDbClient dynamoDbClient)
Provides a function for making the low level synchronous SDK call to DynamoDb.Page<T>
transformResponse(QueryResponse response, TableSchema<T> tableSchema, OperationContext context, DynamoDbEnhancedClientExtension dynamoDbEnhancedClientExtension)
Takes the response object returned by the actual DynamoDb call and maps it into a higher level abstracted result object.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.enhanced.dynamodb.internal.operations.PaginatedIndexOperation
executeOnSecondaryIndex, executeOnSecondaryIndexAsync
-
Methods inherited from interface software.amazon.awssdk.enhanced.dynamodb.internal.operations.PaginatedOperation
execute, executeAsync
-
Methods inherited from interface software.amazon.awssdk.enhanced.dynamodb.internal.operations.PaginatedTableOperation
executeOnPrimaryIndex, executeOnPrimaryIndexAsync
-
-
-
-
Method Detail
-
create
public static <T> QueryOperation<T> create(QueryEnhancedRequest request)
-
operationName
public OperationName operationName()
Description copied from interface:PaginatedTableOperation
The type, or name, of the operation.- Specified by:
operationName
in interfacePaginatedTableOperation<T,QueryRequest,QueryResponse>
-
generateRequest
public QueryRequest generateRequest(TableSchema<T> tableSchema, OperationContext operationContext, DynamoDbEnhancedClientExtension extension)
Description copied from interface:PaginatedOperation
This method generates the request that needs to be sent to a low levelDynamoDbClient
.- Specified by:
generateRequest
in interfacePaginatedOperation<T,QueryRequest,QueryResponse>
- Parameters:
tableSchema
- ATableSchema
that maps the table to a modelled object.operationContext
- An object containing the context, or target, of the command execution.extension
- ADynamoDbEnhancedClientExtension
that may modify the request of this operation. A null value here will result in no modifications.- Returns:
- A request that can be used as an argument to a
DynamoDbClient
call to perform the operation.
-
serviceCall
public Function<QueryRequest,SdkIterable<QueryResponse>> serviceCall(DynamoDbClient dynamoDbClient)
Description copied from interface:PaginatedOperation
Provides a function for making the low level synchronous SDK call to DynamoDb.- Specified by:
serviceCall
in interfacePaginatedOperation<T,QueryRequest,QueryResponse>
- Parameters:
dynamoDbClient
- A low levelDynamoDbClient
to make the call against.- Returns:
- A function that calls a paginated DynamoDb operation with a provided request object and returns the response object.
-
asyncServiceCall
public Function<QueryRequest,SdkPublisher<QueryResponse>> asyncServiceCall(DynamoDbAsyncClient dynamoDbAsyncClient)
Description copied from interface:PaginatedOperation
Provides a function for making the low level non-blocking asynchronous SDK call to DynamoDb.- Specified by:
asyncServiceCall
in interfacePaginatedOperation<T,QueryRequest,QueryResponse>
- Parameters:
dynamoDbAsyncClient
- A low levelDynamoDbAsyncClient
to make the call against.- Returns:
- A function that calls a paginated DynamoDb operation with a provided request object and returns the response object.
-
transformResponse
public Page<T> transformResponse(QueryResponse response, TableSchema<T> tableSchema, OperationContext context, DynamoDbEnhancedClientExtension dynamoDbEnhancedClientExtension)
Description copied from interface:PaginatedOperation
Takes the response object returned by the actual DynamoDb call and maps it into a higher level abstracted result object.- Specified by:
transformResponse
in interfacePaginatedOperation<T,QueryRequest,QueryResponse>
- Parameters:
response
- The response object returned by the DynamoDb call for this operation.tableSchema
- ATableSchema
that maps the table to a modelled object.context
- An object containing the context, or target, of the command execution.dynamoDbEnhancedClientExtension
- ADynamoDbEnhancedClientExtension
that may modify the result of this operation. A null value here will result in no modifications.- Returns:
- A high level result object as specified by the implementation of this operation.
-
-