List of usage examples for com.amazonaws.services.dynamodbv2.model GetItemRequest getKey
public java.util.Map<String, AttributeValue> getKey()
A map of attribute names to AttributeValue
objects, representing the primary key of the item to retrieve.
From source file:amazon.dynamodb.config.DynamoDBManager.java
License:Open Source License
public GetPointResult getPoint(GetPointRequest getPointRequest) { long geohash = S2Manager.generateGeohash(getPointRequest.getGeoPoint()); long hashKey = S2Manager.generateHashKey(geohash, config.getHashKeyLength()); GetItemRequest getItemRequest = getPointRequest.getGetItemRequest(); getItemRequest.setTableName(config.getTableName()); AttributeValue hashKeyValue = new AttributeValue().withN(String.valueOf(hashKey)); getItemRequest.getKey().put(config.getHashKeyAttributeName(), hashKeyValue); getItemRequest.getKey().put(config.getRangeKeyAttributeName(), getPointRequest.getRangeKeyValue()); GetItemResult getItemResult = config.getDynamoDBClient().getItem(getItemRequest); GetPointResult getPointResult = new GetPointResult(getItemResult); return getPointResult; }