Package org.ofbiz.entity

Examples of org.ofbiz.entity.Delegator.makeValue()


                    if (contentPurposeList != null) {
                        Set<String> contentPurposeSet = UtilMisc.makeSetWritable(contentPurposeList);
                        Iterator<String> iter = contentPurposeSet.iterator();
                        while (iter.hasNext()) {
                            String contentPurposeTypeId = iter.next();
                            GenericValue contentPurpose = delegator.makeValue("ContentPurpose", UtilMisc.toMap("contentId", contentId, "contentPurposeTypeId", contentPurposeTypeId));
                            contentPurpose.create();
                        }
                    }
                } catch (GenericEntityException e) {
                    return ServiceUtil.returnError(e.toString());
View Full Code Here


      Delegator delegator = dctx.getDelegator();
      LocalDispatcher dispatcher = dctx.getDispatcher();
      Map<String, Object> context = UtilMisc.makeMapWritable(rcontext);
      Map<String, Object> result = FastMap.newInstance();
      Map<String, Object> newDrContext = FastMap.newInstance();
      GenericValue dataResource = delegator.makeValue("DataResource");
      dataResource.setPKFields(context);
      dataResource.setNonPKFields(context);
      dataResource.setAllFields(context, false, "dr", null);
      context.putAll(dataResource);
View Full Code Here

      dataResource.setPKFields(context);
      dataResource.setNonPKFields(context);
      dataResource.setAllFields(context, false, "dr", null);
      context.putAll(dataResource);

      GenericValue electronicText = delegator.makeValue("ElectronicText");
      electronicText.setPKFields(context);
      electronicText.setNonPKFields(context);
      String textData = (String)electronicText.get("textData");

View Full Code Here

        boolean doLink = (action != null && action.equalsIgnoreCase("Y")) ? true : false;
        if (Debug.infoOn()) {
            Debug.logInfo("in updateOrRemove, context:" + context, module);
        }
        try {
            GenericValue entityValuePK = delegator.makeValue(entityName, pkFields);
            if (Debug.infoOn()) {
                Debug.logInfo("in updateOrRemove, entityValuePK:" + entityValuePK, module);
            }
            GenericValue entityValueExisting = delegator.findByPrimaryKeyCache(entityName, entityValuePK);
            if (Debug.infoOn()) {
View Full Code Here

        } catch (GenericEntityException e) {
            return ServiceUtil.returnError(e.toString());
        }

        if (contentRole == null) {
            contentRole = delegator.makeValue("ContentRole");
            contentRole.set("contentId", webPubPt);
            contentRole.set("partyId", partyId);
            contentRole.set("roleTypeId", roleTypeId);
            contentRole.set("fromDate", nowTimestamp);
        }
View Full Code Here

            if (feedback != null) {
                String partyId = null;
                GenericValue userLoginEx = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", userID));
                if (userLoginEx == null) {
                    //Party
                    GenericValue party =  delegator.makeValue("Party");
                    partyId = delegator.getNextSeqId("Party");
                    party.put("partyId", partyId);
                    party.put("partyTypeId", "PERSON");
                    party.create();
                    //UserLogin
View Full Code Here

                    partyId = delegator.getNextSeqId("Party");
                    party.put("partyId", partyId);
                    party.put("partyTypeId", "PERSON");
                    party.create();
                    //UserLogin
                    userLoginEx =  delegator.makeValue("UserLogin");
                    userLoginEx.put("userLoginId", userID);
                    userLoginEx.put("partyId", partyId);
                    userLoginEx.create();
                } else {
                    partyId = userLoginEx.getString("partyId");
View Full Code Here

                    partyId = userLoginEx.getString("partyId");
                }
                //PartyRole For eBay User
                List<GenericValue> partyRoles = delegator.findByAnd("PartyRole", UtilMisc.toMap("partyId", partyId, "roleTypeId", "OWNER"));
                if (partyRoles.size() == 0) {
                    GenericValue partyRole =  delegator.makeValue("PartyRole");
                    partyRole.put("partyId", partyId);
                    partyRole.put("roleTypeId", "OWNER");
                    partyRole.create();
                }
                int feedbackLength = feedback.length;
View Full Code Here

                    String commentingUserId= feedback[i].getCommentingUser();
                    String commentingPartyId = null;
                    List<GenericValue> CommentingUserLogins = delegator.findByAnd("UserLogin", UtilMisc.toMap("userLoginId", commentingUserId));
                    if (CommentingUserLogins.size() == 0) {
                        //Party
                        GenericValue party =  delegator.makeValue("Party");
                        commentingPartyId = delegator.getNextSeqId("Party");
                        party.put("partyId", commentingPartyId);
                        party.put("partyTypeId", "PERSON");
                        party.create();
                        //UserLogin
View Full Code Here

                        commentingPartyId = delegator.getNextSeqId("Party");
                        party.put("partyId", commentingPartyId);
                        party.put("partyTypeId", "PERSON");
                        party.create();
                        //UserLogin
                        userLoginEx =  delegator.makeValue("UserLogin");
                        userLoginEx.put("userLoginId", commentingUserId);
                        userLoginEx.put("partyId", commentingPartyId);
                        userLoginEx.create();
                    } else {
                        userLoginEx = CommentingUserLogins.get(0);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.