public static int makeListItemSurveyResp(Delegator delegator,GenericValue item,List<String> surveyResps) throws GenericEntityException {
  if (UtilValidate.isNotEmpty(surveyResps)) {
    int count=0;
    for (    String responseId : surveyResps) {
      GenericValue listResp=delegator.makeValue("ShoppingListItemSurvey");
      listResp.set("shoppingListId",item.getString("shoppingListId"));
      listResp.set("shoppingListItemSeqId",item.getString("shoppingListItemSeqId"));
      listResp.set("surveyResponseId",responseId);
      delegator.create(listResp);
      count++;
    }
    return count;
  }
  return -1;
}

public static int makeListItemSurveyResp ( Delegator delegator , GenericValue item , List < String > surveyResps ) throws GenericEntityException { if ( UtilValidate . isNotEmpty ( surveyResps ) ) { int count = 0 ; for ( String responseId : surveyResps ) { GenericValue listResp = delegator . makeValue ( "ShoppingListItemSurvey" ) ; listResp . set ( "shoppingListId" , item . getString ( "shoppingListId" ) ) ; listResp . set ( "shoppingListItemSeqId" , item . getString ( "shoppingListItemSeqId" ) ) ; listResp . set ( "surveyResponseId" , responseId ) ; delegator . create ( listResp ) ; count ++ ; } return count ; } return - 1 ; }
creates records for survey responses on survey items
