Package org.ofbiz.entity

Examples of org.ofbiz.entity.GenericValue.create()


                        //Party
                        GenericValue party =  delegator.makeValue("Party");
                        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();
View Full Code Here


                    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();
                    //ElectronicText
                    GenericValue electronicText =  delegator.makeValue("ElectronicText");
                    electronicText.put("dataResourceId", dataResourceId);
                    electronicText.put("textData", textData);
                    electronicText.create();
View Full Code Here

                    dataResource.create();
                    //ElectronicText
                    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);
View Full Code Here

                    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();
                    //ContentPurpose
                    GenericValue contentPurpose =  delegator.makeValue("ContentPurpose");
                    contentPurpose.put("contentId", contentId);
                    contentPurpose.put("contentPurposeTypeId", "FEEDBACK");
                    contentPurpose.create();
View Full Code Here

                    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"));
                    if (commentingPartyRoles.size() == 0) {
                        GenericValue partyRole =  delegator.makeValue("PartyRole");
                        partyRole.put("partyId", commentingPartyId);
View Full Code Here

                    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
                    List<GenericValue> contentRoles = delegator.findByAnd("ContentRole", UtilMisc.toMap("partyId", partyId, "roleTypeId", "OWNER", "contentId", contentId));
                    if (contentRoles.size() == 0) {
                        GenericValue contentRole =  delegator.makeValue("ContentRole");
View Full Code Here

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

                        GenericValue contentRole =  delegator.makeValue("ContentRole");
                        contentRole.put("contentId", contentId);
                        contentRole.put("partyId", commentingPartyId);
                        contentRole.put("roleTypeId", "COMMENTATOR");
                        contentRole.put("fromDate", UtilDateTime.nowTimestamp());
                        contentRole.create();
                    }
                }
            }
        } catch (ApiException e) {
            // TODO Auto-generated catch block
View Full Code Here

                        newEntity.set("fromDate", UtilDateTime.nowTimestamp());
                    }
                }

                newEntity.setNonPKFields(parameters, true);
                newEntity.create();
            } else if ("update".equals(modelService.invoke)) {
                /*
                <auto-attributes include="pk" mode="IN" optional="false"/>
                 *
                <entity-one entity-name="ExampleItem" value-name="lookedUpValue"/>
View Full Code Here

        } catch (UnsupportedOperationException e) {
        }
        // Test entity value create operation updates the cache
        testValue = (GenericValue) testValue.clone();
        testValue.put("testingTypeId", "TEST-9");
        testValue.create();
        testList = delegator.findList("TestingType", testCondition, null, null, null, true);
        assertEquals("Delegator findList returned two values", 2, testList.size());
        // Test entity value update operation updates the cache
        testValue.put("description", "New Testing Type #2");
        testValue.store();
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.