Examples of findOne()


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

        }
        // get the order header
        GenericValue orderHeader = null;
        if (UtilValidate.isNotEmpty(orderId)) {
            try {
                orderHeader = delegator.findOne("OrderHeader", UtilMisc.toMap("orderId", orderId), false);
            } catch (GenericEntityException e) {
                Debug.logError(e, "Cannot get the order header for order: " + orderId, module);
                request.setAttribute("_ERROR_MESSAGE_", UtilProperties.getMessage(resourceErr, "idealEvents.problemsGettingOrderHeader", locale));
                return "error";
            }
View Full Code Here

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

            return false;
        }

        GenericValue userLoginId = null;
        try {
            userLoginId = delegator.findOne("UserLogin", UtilMisc.toMap("userLoginId", "system"), false);
        } catch (GenericEntityException e) {
            return false;
        }

        // create a payment record too
View Full Code Here

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

        String orderId = "";
        // Get the OrderPaymentPreference
        GenericValue paymentPref = null;
        try {
            if (orderPaymentPreferenceId != null) {
                paymentPref = delegator.findOne("OrderPaymentPreference",
                        UtilMisc.toMap("orderPaymentPreferenceId", orderPaymentPreferenceId), false);
                orderId = paymentPref.getString("orderId");
            }
            else {
                orderId =  (String) context.get("orderId");
View Full Code Here

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

        String orderPaymentPreferenceId = (String) context.get("orderPaymentPreferenceId");
        BigDecimal amount = (BigDecimal) context.get("amount");
        Locale locale = (Locale) context.get("locale");
        GenericValue orderPaymentPreference = null;
        try {
            orderPaymentPreference = delegator.findOne("OrderPaymentPreference", UtilMisc.toMap("orderPaymentPreferenceId", orderPaymentPreferenceId), false);
        } catch (GenericEntityException e) {
            Debug.logError(e, module);
            return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                    "AccountingProblemGettingOrderPaymentPreferences", locale) + " " +
                    orderPaymentPreferenceId);
View Full Code Here

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

            return ServiceUtil.returnError(e.getMessage());
        }
       
        GenericValue content = null;
        try {
            content = delegator.findOne("Content", UtilMisc.toMap("contentId", contentId), false);
        } catch (GenericEntityException e) {
            Debug.logError(e, module);
            return ServiceUtil.returnError(e.getMessage());
        }
       
View Full Code Here

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

                    Debug.logError(e, module);
                    return ServiceUtil.returnError(e.getMessage());
                }
                GenericValue content = null;
                try {
                    content = delegator.findOne("Content", UtilMisc.toMap("contentId", contentId), false);
                } catch (GenericEntityException e) {
                    Debug.logError(e, module);
                    return ServiceUtil.returnError(e.getMessage());
                }
                if (content != null) {
View Full Code Here

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

                            Debug.logError(e, module);
                            return ServiceUtil.returnError(e.getMessage());
                        }
                        GenericValue contentAssocUp = null;
                        try {
                            contentAssocUp = delegator.findOne("Content", UtilMisc.toMap("contentId", contentAssoc.get("contentIdTo")), false);
                        } catch (GenericEntityException e) {
                            Debug.logError(e, module);
                            return ServiceUtil.returnError(e.getMessage());
                        }
                        if (contentAssocUp != null) {
View Full Code Here

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

            sizeTagElement = tagElements.get(tagElements.size() - 2);
        }
       
        GenericValue content = null;
        try {
            GenericValue contentResult = delegator.findOne("Content", UtilMisc.toMap("contentId", contentId), false);
            if (contentResult == null) {
                content = delegator.findOne("Content", UtilMisc.toMap("contentId", sizeTagElement), false);
            } else {
                content = delegator.findOne("Content", UtilMisc.toMap("contentId", contentId), false);
            }
View Full Code Here

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

       
        GenericValue content = null;
        try {
            GenericValue contentResult = delegator.findOne("Content", UtilMisc.toMap("contentId", contentId), false);
            if (contentResult == null) {
                content = delegator.findOne("Content", UtilMisc.toMap("contentId", sizeTagElement), false);
            } else {
                content = delegator.findOne("Content", UtilMisc.toMap("contentId", contentId), false);
            }
        } catch (GenericEntityException e) {
            Debug.logError(e, module);
View Full Code Here

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

        try {
            GenericValue contentResult = delegator.findOne("Content", UtilMisc.toMap("contentId", contentId), false);
            if (contentResult == null) {
                content = delegator.findOne("Content", UtilMisc.toMap("contentId", sizeTagElement), false);
            } else {
                content = delegator.findOne("Content", UtilMisc.toMap("contentId", contentId), false);
            }
        } catch (GenericEntityException 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.