List of usage examples for com.amazonaws.services.dynamodbv2 AmazonDynamoDBClient scan
@Override
public ScanResult scan(ScanRequest request)
The Scan
operation returns one or more items and item attributes by accessing every item in a table or a secondary index.
From source file:awslabs.lab51.SolutionCode.java
License:Open Source License
@Override public List<Map<String, AttributeValue>> getImageItems(AmazonDynamoDBClient dynamoDbClient) { try {//w w w .ja v a 2 s.c om String tableName = System.getProperty("SESSIONTABLE"); String keyPrefix = System.getProperty("PARAM3"); ScanRequest scanRequest = new ScanRequest(tableName).withSelect("ALL_ATTRIBUTES"); if (!keyPrefix.isEmpty()) { Map<String, Condition> scanFilter = new HashMap<String, Condition>(); scanFilter.put("Key", new Condition().withAttributeValueList(new AttributeValue().withS(keyPrefix)) .withComparisonOperator("BEGINS_WITH")); scanRequest.withScanFilter(scanFilter); } return dynamoDbClient.scan(scanRequest).getItems(); } catch (Exception ex) { labController.logMessageToPage("getImageItems Error: " + ex.getMessage() + ":" + ex.getStackTrace()); return null; } }