Class DefaultDynamoDbIndex<T>
- All Implemented Interfaces:
- DynamoDbIndex<T>
- 
Method SummaryModifier and TypeMethodDescriptionbooleaninthashCode()Gets the physical secondary index name that operations performed by this object will be executed against.Creates aKeyobject from a modelled item.Gets theDynamoDbEnhancedClientExtensionassociated with this mapped resource.SdkIterable<Page<T>> query(Consumer<QueryEnhancedRequest.Builder> requestConsumer) Executes a query against a secondary index using aQueryConditionalexpression to retrieve a list of items matching the given conditions.SdkIterable<Page<T>> query(QueryConditional queryConditional) Executes a query against the secondary index of the table using aQueryConditionalexpression to retrieve a list of items matching the given conditions.SdkIterable<Page<T>> query(QueryEnhancedRequest request) Executes a query against a secondary index using aQueryConditionalexpression to retrieve a list of items matching the given conditions.SdkIterable<Page<T>> scan()Scans the table against a secondary index and retrieves all items using default settings.SdkIterable<Page<T>> scan(Consumer<ScanEnhancedRequest.Builder> requestConsumer) Scans the table against a secondary index and retrieves all items.SdkIterable<Page<T>> scan(ScanEnhancedRequest request) Scans the table against a secondary index and retrieves all items.Gets the physical table name that operations performed by this object will be executed against.Gets theTableSchemaobject that this mapped table was built with.
- 
Method Details- 
queryDescription copied from interface:DynamoDbIndexExecutes a query against a secondary index using aQueryConditionalexpression to retrieve a list of items matching the given conditions.The result is accessed through iterable pages (see 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 theQueryEnhancedRequest.The additional configuration parameters that the enhanced client supports are defined in the QueryEnhancedRequest.This operation calls the low-level DynamoDB API Query operation. Consult the Query documentation for further details and constraints. Example: QueryConditional queryConditional = QueryConditional.keyEqualTo(Key.builder().partitionValue("id-value").build()); Iterator<Page<MyItem>> results = mappedIndex.query(QueryEnhancedRequest.builder() .queryConditional(queryConditional) .build());- Specified by:
- queryin interface- DynamoDbIndex<T>
- Parameters:
- request- A- QueryEnhancedRequestdefining the query conditions and how to handle the results.
- Returns:
- an iterator of type SdkIterablewith paginated results (seePage).
 
- 
queryDescription copied from interface:DynamoDbIndexExecutes a query against a secondary index using aQueryConditionalexpression to retrieve a list of items matching the given conditions.The result is accessed through iterable pages (see 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 theQueryEnhancedRequest.The additional configuration parameters that the enhanced client supports are defined in the 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 QueryEnhancedRequest.builder().Example: Iterator<Page<MyItem>> results = mappedIndex.query(r -> r.queryConditional(QueryConditional.keyEqualTo(k -> k.partitionValue("id-value"))));- Specified by:
- queryin interface- DynamoDbIndex<T>
- Parameters:
- requestConsumer- A- Consumerof- QueryEnhancedRequestdefining the query conditions and how to handle the results.
- Returns:
- an iterator of type SdkIterablewith paginated results (seePage).
 
- 
queryDescription copied from interface:DynamoDbIndexExecutes a query against the secondary index of the table using aQueryConditionalexpression to retrieve a list of items matching the given conditions.The result is accessed through iterable pages (see 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: Iterator<Page<MyItem>> results = mappedIndex.query(QueryConditional.keyEqualTo(Key.builder().partitionValue("id-value").build()));- Specified by:
- queryin interface- DynamoDbIndex<T>
- Parameters:
- queryConditional- A- QueryConditionaldefining the matching criteria for records to be queried.
- Returns:
- an iterator of type SdkIterablewith paginated results (seePage).
 
- 
scanDescription copied from interface:DynamoDbIndexScans the table against a secondary index and retrieves all items.The result is accessed through iterable pages (see 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 ScanEnhancedRequest.Example: Iterator<Page<MyItem>> results = mappedTable.scan(ScanEnhancedRequest.builder().consistentRead(true).build());- Specified by:
- scanin interface- DynamoDbIndex<T>
- Parameters:
- request- A- ScanEnhancedRequestdefining how to handle the results.
- Returns:
- an iterator of type SdkIterablewith paginated results (seePage).
 
- 
scanDescription copied from interface:DynamoDbIndexScans the table against a secondary index and retrieves all items.The result is accessed through iterable pages (see 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 ScanEnhancedRequest.Note: This is a convenience method that creates an instance of the request builder avoiding the need to create one manually via ScanEnhancedRequest.builder().Example: Iterator<Page<MyItem>> results = mappedTable.scan(r -> r.limit(5));- Specified by:
- scanin interface- DynamoDbIndex<T>
- Parameters:
- requestConsumer- A- Consumerof- ScanEnhancedRequestdefining the query conditions and how to handle the results.
- Returns:
- an iterator of type SdkIterablewith paginated results (seePage).
 
- 
scanDescription copied from interface:DynamoDbIndexScans the table against a secondary index and retrieves all items using default settings.The result is accessed through iterable pages (see 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: Iterator<Page<MyItem>> results = mappedTable.scan();- Specified by:
- scanin interface- DynamoDbIndex<T>
- Returns:
- an iterator of type SdkIterablewith paginated results (seePage).
 
- 
mapperExtensionDescription copied from interface:DynamoDbIndexGets theDynamoDbEnhancedClientExtensionassociated with this mapped resource.- Specified by:
- mapperExtensionin interface- DynamoDbIndex<T>
- Returns:
- The DynamoDbEnhancedClientExtensionassociated with this mapped resource.
 
- 
tableSchemaDescription copied from interface:DynamoDbIndexGets theTableSchemaobject that this mapped table was built with.- Specified by:
- tableSchemain interface- DynamoDbIndex<T>
- Returns:
- The TableSchemaobject for this mapped table.
 
- 
dynamoDbClient
- 
tableNameDescription copied from interface:DynamoDbIndexGets the physical table name that operations performed by this object will be executed against.- Specified by:
- tableNamein interface- DynamoDbIndex<T>
- Returns:
- The physical table name.
 
- 
indexNameDescription copied from interface:DynamoDbIndexGets the physical secondary index name that operations performed by this object will be executed against.- Specified by:
- indexNamein interface- DynamoDbIndex<T>
- Returns:
- The physical secondary index name.
 
- 
keyFromDescription copied from interface:DynamoDbIndexCreates aKeyobject from a modelled item. This key can be used in query conditionals and get operations to locate a specific record.- Specified by:
- keyFromin interface- DynamoDbIndex<T>
- Parameters:
- item- The item to extract the key fields from.
- Returns:
- A key that has been initialized with the index values extracted from the modelled object.
 
- 
equals
- 
hashCode
 
-