Package org.ofbiz.entity

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


            orderHeader.set("createdBy", userLogin.getString("userLoginId"));
        }

        // first try to create the OrderHeader; if this does not fail, continue.
        try {
            delegator.create(orderHeader);
        } catch (GenericEntityException e) {
            Debug.logError(e, "Cannot create OrderHeader entity; problems with insert", module);
            return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderOrderCreationFailedPleaseNotifyCustomerService",locale));
        }
View Full Code Here


                        }

                        if (rtSeg == null) {
                            rtSeg = delegator.makeValue("ShipmentRouteSegment", UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", "00001"));
                            try {
                                delegator.create(rtSeg);
                            } catch (GenericEntityException e) {
                                Debug.logError(e, module);
                                return ServiceUtil.returnError(e.getMessage());
                            }
                        }
View Full Code Here

                    }

                    if (pkgRtSeg == null) {
                        pkgRtSeg = delegator.makeValue("ShipmentPackageRouteSeg", pkgCtx);
                        try {
                            delegator.create(pkgRtSeg);
                        } catch (GenericEntityException e) {
                            Debug.logError(e, module);
                            return ServiceUtil.returnError(e.getMessage());
                        }
                    }
View Full Code Here

                        Entity.set("createdDate", UtilDateTime.nowTimestamp());
                        Entity.set("lastUpdatedStamp",UtilDateTime.nowTimestamp());
                        Entity.set("lastUpdatedTxStamp",UtilDateTime.nowTimestamp());
                        Entity.set("createdStamp",UtilDateTime.nowTimestamp());
                        Entity.set("createdTxStamp",UtilDateTime.nowTimestamp());
                        delegator.create(Entity);

                        Entity = null;
                        Entity = delegator.makeValue("Content");
                        Entity.set("contentId", "HOME_DUCUMENT");
                        Entity.set("contentName", "Home");
View Full Code Here

                        Entity.set("createdDate", UtilDateTime.nowTimestamp());
                        Entity.set("lastUpdatedStamp",UtilDateTime.nowTimestamp());
                        Entity.set("lastUpdatedTxStamp",UtilDateTime.nowTimestamp());
                        Entity.set("createdStamp",UtilDateTime.nowTimestamp());
                        Entity.set("createdTxStamp",UtilDateTime.nowTimestamp());
                        delegator.create(Entity);

                        Map<String, Object> contentAssoc = FastMap.newInstance();
                        contentAssoc.put("contentId", "HOME_DUCUMENT");
                        contentAssoc.put("contentAssocTypeId", "TREE_CHILD");
                        contentAssoc.put("contentIdTo", "ROOT");
View Full Code Here

                                            Entity.set("createdDate", UtilDateTime.nowTimestamp());
                                            Entity.set("lastUpdatedStamp",UtilDateTime.nowTimestamp());
                                            Entity.set("lastUpdatedTxStamp",UtilDateTime.nowTimestamp());
                                            Entity.set("createdStamp",UtilDateTime.nowTimestamp());
                                            Entity.set("createdTxStamp",UtilDateTime.nowTimestamp());
                                            delegator.create(Entity);
                                            hasFolder = false;
                                        } else {
                                            //Debug.log("Content Name = [ "+contentId+"] already exist.");//ShoW log file
                                            hasFolder = true;
                                        }
View Full Code Here

                        Entity.set("createdDate", UtilDateTime.nowTimestamp());
                        Entity.set("lastUpdatedStamp",UtilDateTime.nowTimestamp());
                        Entity.set("lastUpdatedTxStamp",UtilDateTime.nowTimestamp());
                        Entity.set("createdStamp",UtilDateTime.nowTimestamp());
                        Entity.set("createdTxStamp",UtilDateTime.nowTimestamp());
                        delegator.create(Entity);

                        //Relation Content
                        Map<String,Object> contentAssoc = FastMap.newInstance();
                        contentAssoc.put("contentId", contentId);
                        contentAssoc.put("contentAssocTypeId", "SUB_CONTENT");
View Full Code Here

                        Entity.set("createdDate", UtilDateTime.nowTimestamp());
                        Entity.set("lastUpdatedStamp",UtilDateTime.nowTimestamp());
                        Entity.set("lastUpdatedTxStamp",UtilDateTime.nowTimestamp());
                        Entity.set("createdStamp",UtilDateTime.nowTimestamp());
                        Entity.set("createdTxStamp",UtilDateTime.nowTimestamp());
                        delegator.create(Entity);

                        //create ContentAssoc
                        Map<String,Object> contentAssoc = FastMap.newInstance();
                        contentAssoc.put("contentId", contentId);
                        contentAssoc.put("contentAssocTypeId", "SUB_CONTENT");
View Full Code Here

        response.set("referenceNum", "ERROR");
        response.set("gatewayMessage", message);
        response.set("transactionDate", UtilDateTime.nowTimestamp());

        try {
            delegator.create(response);
        } catch (GenericEntityException e) {
            Debug.logError(e, module);
            return ServiceUtil.returnError("Unable to create PaymentGatewayResponse for failed service call!");
        }
View Full Code Here

        LocalDispatcher dispatcher = dctx.getDispatcher();
        GenericDelegator delegator = dctx.getDelegator();

        try {
            dispatcher.addRollbackService("savePaymentGatewayResponse", context, true);
            delegator.create(pgr);
        } catch (Exception e) {
            Debug.logError(e, module);
        }
    }
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.