public < T > ScanResultPage < T > scanPage ( Class < T > clazz , DynamoDBScanExpression scanExpression , DynamoDBMapperConfig config ) { config = mergeConfig ( config ) ; ScanRequest scanRequest = createScanRequestFromExpression ( clazz , scanExpression , config ) ; ScanResult scanResult = db . scan ( applyUserAgent ( scanRequest ) ) ; ScanResultPage < T > result = new ScanResultPage < T > ( ) ; result . setResults ( marshallIntoObjects ( clazz , scanResult . getItems ( ) ) ) ; result . setLastEvaluatedKey ( scanResult . getLastEvaluatedKey ( ) ) ; return result ; }
Scans through an Amazon DynamoDB table and returns a single page of matching results . The table to scan is determined by looking at the annotations on the specified class which declares where to store the object data in AWS DynamoDB and the scan expression parameter allows the caller to filter results and control how the scan is executed .