elementToUpdate.setResults(productStatisticsList);
return elementToUpdate;
}
private BVReviewStatistic processReviewStatistics(JSONObject source) throws BVJSONProcessingException {
BVReviewStatistic reviewStatistics = new BVReviewStatistic();
if (source != null) {
try {
reviewStatistics.setTotalReviewCount(source.getLong(BVConstants.JSON_TOTAL_REVIEW_COUNT.toString()));
} catch (JSONException e) {
throw new BVJSONProcessingException(BVConstants.JSON_TOTAL_REVIEW_COUNT.toString(), e);
}
try {
reviewStatistics.setOverallRatingRange(source.getLong(BVConstants.JSON_OVERALL_RATING_RANGE.toString()));
} catch (JSONException e) {
throw new BVJSONProcessingException(BVConstants.JSON_OVERALL_RATING_RANGE.toString(), e);
}
try {
reviewStatistics.setAverageOverallRating(source.getDouble(BVConstants.JSON_AVERAGE_OVERALL_RATING.toString()));
} catch (JSONException e) {
throw new BVJSONProcessingException(BVConstants.JSON_AVERAGE_OVERALL_RATING.toString(), e);
}
}
return reviewStatistics;