Iterator<GenericValue> prodCategoryMemberIter = prodCategoryMember.iterator();
while (prodCategoryMemberIter.hasNext()) {
GenericValue prodCategory = prodCategoryMemberIter.next();
GenericValue prodCatalogCategory = EntityUtil.getFirst(EntityUtil.filterByDate(delegator.findByAnd("ProdCatalogCategory", UtilMisc.toMap("prodCatalogId", context.get("prodCatalogId"), "productCategoryId", prodCategory.get("productCategoryId").toString()))));
if (UtilValidate.isNotEmpty(prodCatalogCategory)) {
GenericValue prodCategoryRole = EntityUtil.getFirst(EntityUtil.filterByDate(delegator.findByAnd("ProductCategoryRole", UtilMisc.toMap("productCategoryId", prodCatalogCategory.get("productCategoryId").toString(), "partyId", userLogin.get("partyId"),"roleTypeId", "EBAY_ACCOUNT"))));
if (UtilValidate.isNotEmpty(prodCategoryRole)) {
context.put("ebayCategory", prodCategoryRole.get("comments"));
} else {
result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_FAIL);
result.put(ModelService.ERROR_MESSAGE, "Category not found for this product on ebay.");