Set<RetailerCustomerComment> customerComments = retailer.getCustomerComments();
if (Hibernate.isInitialized(customerComments) &&
customerComments != null) {
for (Iterator<RetailerCustomerComment> iterator = customerComments.iterator(); iterator.hasNext();) {
RetailerCustomerComment retailerCustomerComment = (RetailerCustomerComment) iterator.next();
RetailerCustomerCommentViewBean retailerCustomerCommentViewBean = new RetailerCustomerCommentViewBean();
retailerCustomerCommentViewBean.setCustomerDisplayName(retailerCustomerComment.getCustomer().getScreenName());
retailerCustomerCommentViewBean.setCustomerUrl(urlService.buildCustomerDetailsUrl(requestData, retailerCustomerComment.getCustomer().getPermalink()));
retailerCustomerCommentViewBean.setCustomerAvatarImg(requestUtil.getCustomerAvatar(requestData.getRequest(), retailerCustomerComment.getCustomer()));
DateFormat dateFormat = requestUtil.getFormatDate(requestData, DateFormat.MEDIUM, DateFormat.MEDIUM);
if (retailerCustomerComment.getDateCreate() != null) {
retailerCustomerCommentViewBean.setDateCreate(dateFormat.format(retailerCustomerComment.getDateCreate()));
}
retailerCustomerCommentViewBean.setComment(retailerCustomerComment.getComment());
ReviewDataVocabularyPojo reviewDataVocabulary = new ReviewDataVocabularyPojo();
reviewDataVocabulary.setItemreviewed(retailer.getName());
reviewDataVocabulary.setReviewer(retailerCustomerComment.getCustomer().getScreenName());
DateFormat dateFormatDataVocabulary = requestUtil.getDataVocabularyFormatDate(requestData);
reviewDataVocabulary.setDtreviewed(dateFormat.format(retailerCustomerComment.getDateCreate()));
// reviewDataVocabulary.setSummary(summary);
reviewDataVocabulary.setDescription(retailerCustomerComment.getComment());
// reviewDataVocabulary.setRating(rating);
retailerCustomerCommentViewBean.setReviewDataVocabulary(reviewDataVocabulary);
retailerViewBean.getComments().add(retailerCustomerCommentViewBean);
}
}