Examples of findByCondition()


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

            expr = new EntityExpr("thruDate", EntityOperator.LESS_THAN, tsThru);
            exprListAnd.add(expr);
        }
        EntityConditionList contentCondList = new EntityConditionList(exprListAnd, EntityOperator.AND);
        GenericDelegator delegator = currentContent.getDelegator();
        contentList = delegator.findByCondition(contentAssocViewName, contentCondList, null, null);
        return contentList;
    }

    public static List getAssociations(GenericValue currentContent, String linkDir, List assocTypes, String strFromDate, String strThruDate) throws GenericEntityException {
        GenericDelegator delegator = currentContent.getDelegator();
View Full Code Here

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

                new EntityExpr("paymentMethodTypeId", EntityOperator.EQUALS, "EXT_BILLACT"),
                new EntityExpr("statusId", EntityOperator.NOT_IN, UtilMisc.toList("ORDER_CANCELLED", "ORDER_REJECTED")),
                new EntityExpr("preferenceStatusId", EntityOperator.NOT_IN, UtilMisc.toList("PAYMENT_SETTLED", "PAYMENT_RECEIVED", "PAYMENT_DECLINED", "PAYMENT_CANCELLED")) // PAYMENT_NOT_AUTH
            ), EntityOperator.AND);

        List orderPaymentPreferenceSums = delegator.findByCondition("OrderPurchasePaymentSummary", whereConditions, null, UtilMisc.toList("maxAmount"), null, null);
        if (orderPaymentPreferenceSums != null) {
            for (Iterator oppsi = orderPaymentPreferenceSums.iterator(); oppsi.hasNext(); ) {
                GenericValue orderPaymentPreferenceSum = (GenericValue) oppsi.next();
                balance = balance.subtract(orderPaymentPreferenceSum.getBigDecimal("maxAmount"));
            }
View Full Code Here

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

            EntityConditionList havingConditions = new EntityConditionList(UtilMisc.toList(
                    new EntityExpr("quantityIssued", EntityOperator.GREATER_THAN, new Double(0))
                ), EntityOperator.AND);
            List orderItemQuantitiesIssued = null;
            try {
                orderItemQuantitiesIssued = delegator.findByCondition("OrderItemQuantityReportGroupByItem", whereConditions, havingConditions, UtilMisc.toList("orderId", "orderItemSeqId"), UtilMisc.toList("orderItemSeqId"), null);
            } catch (GenericEntityException e) {
                Debug.logError(e, module);
                return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderErrorUnableToGetReturnHeaderFromItem", locale));
            }
            if (orderItemQuantitiesIssued != null) {
View Full Code Here

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

            findOutgoingProductionRunsStatusConds.add(new EntityExpr("currentStatusId", EntityOperator.EQUALS, "PRUN_SCHEDULED"));
            findOutgoingProductionRunsStatusConds.add(new EntityExpr("currentStatusId", EntityOperator.EQUALS, "PRUN_DOC_PRINTED"));
            findOutgoingProductionRunsStatusConds.add(new EntityExpr("currentStatusId", EntityOperator.EQUALS, "PRUN_RUNNING"));
            findOutgoingProductionRunsConds.add(new EntityConditionList(findOutgoingProductionRunsStatusConds, EntityOperator.OR));

            List outgoingProductionRuns = delegator.findByCondition("WorkEffortAndGoods", new EntityConditionList(findOutgoingProductionRunsConds, EntityOperator.AND), null, UtilMisc.toList("-estimatedStartDate"));
            if (outgoingProductionRuns != null) {
                for (int i = 0; i < outgoingProductionRuns.size(); i++) {
                    GenericValue outgoingProductionRun = (GenericValue)outgoingProductionRuns.get(i);
                    Double dblQty = outgoingProductionRun.getDouble("estimatedQuantity");
                    double qty = (dblQty != null? dblQty.doubleValue(): 0.0);
View Full Code Here

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

        }

        List orderBy = UtilMisc.toList("productId", "eventDate");
        try{
            //listResult = delegator.findByAnd("MrpInventoryEventPlanned", parameters, orderBy);
            listResult = delegator.findByCondition("MrpInventoryEventPlanned", parameters, null, orderBy);
        } catch(GenericEntityException e) {
            Debug.logError(e, "Error : delegator.findByCondition(\"MrpInventoryEventPlanned\", parameters, null, orderBy)", module);
            Debug.logError(e, "Error : parameters = "+parameters,module);
            Debug.logError(e, "Error : orderBy = "+orderBy,module);
            return ServiceUtil.returnError("Problem, we can not find the products, for more detail look at the log");
View Full Code Here

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

            // COD only applies if all orders involved with the shipment were paid only with EXT_COD - anything else becomes too complicated
            if (applyCODSurcharge) {

                // Get the paymentMethodTypeIds of all the orderPaymentPreferences involved with the shipment
                List opps = delegator.findByCondition("OrderPaymentPreference", new EntityExpr("orderId", EntityOperator.IN, orderIdSet), null, null);
                List paymentMethodTypeIds = EntityUtil.getFieldListFromEntityList(opps, "paymentMethodTypeId", true);
               
                if (paymentMethodTypeIds.size() > 1 || ! paymentMethodTypeIds.contains("EXT_COD")) {
                    applyCODSurcharge = false;
                }
View Full Code Here

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

                EntityCondition cond = new EntityConditionList(conditionList2, EntityOperator.AND);

                // run the query
                try {
                    orderHeaderList = delegator.findByCondition("OrderHeader", cond, null, UtilMisc.toList("+orderDate"));
                } catch (GenericEntityException e) {
                    Debug.logError(e, module);
                    return ServiceUtil.returnError(e.getMessage());
                }
                Debug.log("Recieved orderIdList  - " + orderIdList, module);
View Full Code Here

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

            GenericDelegator delegator = invoice.getDelegator();
            EntityConditionList condition = new EntityConditionList( UtilMisc.toList(
                    new EntityExpr("invoiceId", EntityOperator.EQUALS, invoice.get("invoiceId")),
                    new EntityExpr("invoiceItemTypeId", EntityOperator.IN, getTaxableInvoiceItemTypeIds(delegator))
                    ), EntityOperator.AND);
            invoiceTaxItems = delegator.findByCondition("InvoiceItem", condition, null, null);
        } catch (GenericEntityException e) {
            Debug.logError(e, "Trouble getting InvoiceItem list", module);           
        }
        if (invoiceTaxItems != null && invoiceTaxItems.size() > 0) {
            Iterator invoiceItemsIter = invoiceTaxItems.iterator();
View Full Code Here

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

        // if it were a purchase order or from the order items of the (possibly linked) orders if the shipment is a drop shipment
        List items = null;
        List orderItemAssocs = null;
        try {
            if (purchaseShipmentFound) {
                items = delegator.findByCondition("ShipmentReceipt", shipmentIdsCond, null, UtilMisc.toList("shipmentId"));
            } else if (dropShipmentFound) {

                List shipments = delegator.findByCondition("Shipment", shipmentIdsCond, null, null);
               
                // Get the list of purchase order IDs related to the shipments
View Full Code Here

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

        try {
            if (purchaseShipmentFound) {
                items = delegator.findByCondition("ShipmentReceipt", shipmentIdsCond, null, UtilMisc.toList("shipmentId"));
            } else if (dropShipmentFound) {

                List shipments = delegator.findByCondition("Shipment", shipmentIdsCond, null, null);
               
                // Get the list of purchase order IDs related to the shipments
                List purchaseOrderIds = EntityUtil.getFieldListFromEntityList(shipments, "primaryOrderId", true);
   
                if (createSalesInvoicesForDropShipments.booleanValue()) {
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.