Map<String, String> fields = UtilMisc.toMap("productId", productId);
List<String> order = UtilMisc.toList("sequenceNum", "productFeatureTypeId");
if (distinct != null) fields.put("productFeatureTypeId", distinct);
if (type != null) fields.put("productFeatureApplTypeId", type);
features = delegator.findByAndCache("ProductFeatureAndAppl", fields, order);
result.put("productFeatures", features);
result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_SUCCESS);
} catch (GenericEntityException e) {
Map<String, String> messageMap = UtilMisc.toMap("errMessage", e.toString());
errMsg = UtilProperties.getMessage(resourceError,