Key key = KeyFactory.stringToKey(encodedKey);
datastore.delete(key);
}
private UploadedImage fromEntity(Entity result) {
UploadedImage image = new UploadedImage();
image.setCreatedAt((Date) result.getProperty(UploadedImage.CREATED_AT));
image.setServingUrl((String) result
.getProperty(UploadedImage.SERVING_URL));
image.setOwnerId((String) result.getProperty(UploadedImage.OWNER_ID));
if (image.getKey() == null) {
String encodedKey = KeyFactory.keyToString(result.getKey());
image.setKey(encodedKey);
}
return image;
}