Package org.ofbiz.entity

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


                    } else {
                        userLoginEx = CommentingUserLogins.get(0);
                        commentingPartyId = userLoginEx.getString("partyId");
                    }
                    //DataResource
                    GenericValue dataResource =  delegator.makeValue("DataResource");
                    String dataResourceId = delegator.getNextSeqId("DataResource");
                    dataResource.put("dataResourceId", dataResourceId);
                    dataResource.put("dataResourceTypeId", "ELECTRONIC_TEXT");
                    dataResource.put("mimeTypeId", "text/html");
                    dataResource.create();
View Full Code Here


                    dataResource.put("dataResourceId", dataResourceId);
                    dataResource.put("dataResourceTypeId", "ELECTRONIC_TEXT");
                    dataResource.put("mimeTypeId", "text/html");
                    dataResource.create();
                    //ElectronicText
                    GenericValue electronicText =  delegator.makeValue("ElectronicText");
                    electronicText.put("dataResourceId", dataResourceId);
                    electronicText.put("textData", textData);
                    electronicText.create();
                    //Content
                    GenericValue content =  delegator.makeValue("Content");
View Full Code Here

                    GenericValue electronicText =  delegator.makeValue("ElectronicText");
                    electronicText.put("dataResourceId", dataResourceId);
                    electronicText.put("textData", textData);
                    electronicText.create();
                    //Content
                    GenericValue content =  delegator.makeValue("Content");
                    content.put("contentId", contentId);
                    content.put("contentTypeId", "DOCUMENT");
                    content.put("dataResourceId", dataResourceId);
                    content.put("createdDate", UtilDateTime.toTimestamp(eBayDateTime));
                    content.create();
View Full Code Here

                    content.put("contentTypeId", "DOCUMENT");
                    content.put("dataResourceId", dataResourceId);
                    content.put("createdDate", UtilDateTime.toTimestamp(eBayDateTime));
                    content.create();
                    //ContentPurpose
                    GenericValue contentPurpose =  delegator.makeValue("ContentPurpose");
                    contentPurpose.put("contentId", contentId);
                    contentPurpose.put("contentPurposeTypeId", "FEEDBACK");
                    contentPurpose.create();
                    //PartyRole For eBay Commentator
                    List<GenericValue> commentingPartyRoles = delegator.findByAnd("PartyRole", UtilMisc.toMap("partyId", commentingPartyId, "roleTypeId", "COMMENTATOR"));
View Full Code Here

                    contentPurpose.put("contentPurposeTypeId", "FEEDBACK");
                    contentPurpose.create();
                    //PartyRole For eBay Commentator
                    List<GenericValue> commentingPartyRoles = delegator.findByAnd("PartyRole", UtilMisc.toMap("partyId", commentingPartyId, "roleTypeId", "COMMENTATOR"));
                    if (commentingPartyRoles.size() == 0) {
                        GenericValue partyRole =  delegator.makeValue("PartyRole");
                        partyRole.put("partyId", commentingPartyId);
                        partyRole.put("roleTypeId", "COMMENTATOR");
                        partyRole.create();
                    }
                    //ContentRole for eBay User
View Full Code Here

                        partyRole.create();
                    }
                    //ContentRole for eBay User
                    List<GenericValue> contentRoles = delegator.findByAnd("ContentRole", UtilMisc.toMap("partyId", partyId, "roleTypeId", "OWNER", "contentId", contentId));
                    if (contentRoles.size() == 0) {
                        GenericValue contentRole =  delegator.makeValue("ContentRole");
                        contentRole.put("contentId", contentId);
                        contentRole.put("partyId", partyId);
                        contentRole.put("roleTypeId", "OWNER");
                        contentRole.put("fromDate", UtilDateTime.nowTimestamp());
                        contentRole.create();
View Full Code Here

                            if (UtilValidate.isEmpty(webappName)) {
                                Debug.logInfo(new Exception(), "The webappName was empty, somehow the initial request settings were missing.", module);
                            }

                            visit = delegator.makeValue("Visit");
                            visit.set("sessionId", session.getId());
                            visit.set("fromDate", new Timestamp(session.getCreationTime()));

                            visit.set("initialLocale", initialLocale);
                            if (initialRequest != null) visit.set("initialRequest", initialRequest.length() > 250 ? initialRequest.substring(0, 250) : initialRequest);
View Full Code Here

                            if (Debug.infoOn()) Debug.logInfo("Found visitorId [" + cookieVisitorId + "] in cookie", module);

                            if (UtilValidate.isEmpty(cookieVisitorId)) {
                                // no visitor cookie? create visitor and send back cookie too
                                visitor = delegator.makeValue("Visitor");
                                try {
                                    delegator.createSetNextSeqId(visitor);
                                } catch (GenericEntityException e) {
                                    Debug.logError(e, "Could not create new visitor:", module);
                                    visitor = null;
View Full Code Here

                            } else {
                                try {
                                    visitor = delegator.findOne("Visitor", false, "visitorId", cookieVisitorId);
                                    if (visitor == null) {
                                        // looks like we have an ID that doesn't exist in our database, so we'll create a new one
                                        visitor = delegator.makeValue("Visitor");
                                        visitor = delegator.createSetNextSeqId(visitor);
                                        if (Debug.infoOn()) Debug.logInfo("The visitorId [" + cookieVisitorId + "] found in cookie was invalid, creating new Visitor with ID [" + visitor.getString("visitorId") + "]", module);
                                    }
                                } catch (GenericEntityException e) {
                                    Debug.logError(e, "Error finding visitor with ID from cookie: " + cookieVisitorId, module);
View Full Code Here

                        errMsg = e.getMessage();
                        Debug.logError(e, "External Authenticator had fatal exception : " + e.getMessage(), module);
                    }
                    if (externalAuth) {
                        // external auth passed - create a placeholder object for session
                        userLogin = delegator.makeValue("UserLogin");
                        userLogin.set("userLoginId", username);
                        userLogin.set("enabled", "Y");
                        userLogin.set("hasLoggedOut", "N");
                        result.put("userLogin", userLogin);
                        result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_SUCCESS);
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.