Examples of findByCondition()


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

                                new EntityExpr("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER"),
                                new EntityExpr("orderStatusId", EntityOperator.NOT_IN, UtilMisc.toList("ORDER_REJECTED", "ORDER_CANCELLED")),
                                new EntityExpr("orderItemStatusId", EntityOperator.NOT_IN, UtilMisc.toList("ITEM_REJECTED", "ITEM_CANCELLED")),
                                new EntityExpr("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, timePeriodStart)
                                ), EntityOperator.AND);
                    GenericValue count = EntityUtil.getFirst( delegator.findByCondition("OrderItemQuantityReportGroupByProduct", prodConditions, UtilMisc.toList("quantityOrdered"), null) );
                    if (count != null) {
                        sold = count.getDouble("quantityOrdered");
                        if (sold != null) productsSold.put(productId, sold);
                    }
                }
View Full Code Here

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

                        EntityUtil.getFilterByDateExpr(), EntityUtil.getFilterByDateExpr("contactFromDate", "contactThruDate")
                        );
            EntityConditionList conditions = new EntityConditionList(conditionList, EntityOperator.AND);
            List fieldsToSelect = UtilMisc.toList("infoString");

            List sendToEmails = delegator.findByCondition("ContactListPartyAndContactMech", conditions,  null, fieldsToSelect, null,
                    new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true));
           
            // Send an email to each contact list member
            // TODO: Contact lists for emails really should be written as an EntityListIterator for very large lists!
            List orderBy = UtilMisc.toList("-fromDate");
View Full Code Here

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

        List runningStates = UtilMisc.toList("open.running");
        List order = UtilMisc.toList(org.ofbiz.shark.SharkConstants.startedTime);
        List createdList = new ArrayList();
        List lookupList = null;
        try {
            lookupList = delegator.findByCondition(org.ofbiz.shark.SharkConstants.WfProcess,
                    makeStateListCondition(org.ofbiz.shark.SharkConstants.currentState, runningStates, EntityOperator.EQUALS, EntityOperator.OR), null, order);
        } catch (GenericEntityException e) {
            throw new PersistenceException(e);
        }
        if (!UtilValidate.isEmpty(lookupList)) {
View Full Code Here

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

        List lookupList = null;

        try {
            EntityCondition stateCond = this.makeStateListCondition(org.ofbiz.shark.SharkConstants.currentState, finsihedStates, EntityOperator.EQUALS, EntityOperator.OR);
            EntityCondition cond = this.makeProcessFilterCondition(stateCond, packageId, processDefId, packageVer, finishedBefore);
            lookupList = delegator.findByCondition(org.ofbiz.shark.SharkConstants.WfProcess, cond, null, order);
        } catch (GenericEntityException e) {
            throw new PersistenceException(e);
        }
        if (!UtilValidate.isEmpty(lookupList)) {
            Iterator i = lookupList.iterator();
View Full Code Here

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

        }

        EntityCondition cond = new EntityConditionList(exprList, EntityOperator.AND);
        List lookupList = null;
        try {
            lookupList = delegator.findByCondition(org.ofbiz.shark.SharkConstants.WfRepository, cond, null, UtilMisc.toList("-xpdlVersion"));
        } catch (GenericEntityException e) {
            throw new RepositoryException(e);
        } finally {
            Debug.set(Debug.VERBOSE, false);
        }
View Full Code Here

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

                EntityCondition stateCond = this.makeStateListCondition(org.ofbiz.shark.SharkConstants.currentState, states, operator, EntityOperator.OR);
                cond = new EntityConditionList(UtilMisc.toList(proc, stateCond), EntityOperator.AND);
            } else {
                cond = proc;
            }
            lookupList = delegator.findByCondition(org.ofbiz.shark.SharkConstants.WfActivity, cond, null, order);
        } catch (GenericEntityException e) {
            throw new PersistenceException(e);
        }
        if (lookupList != null && lookupList.size() > 0) {
            Iterator i = lookupList.iterator();
View Full Code Here

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

            findIncomingProductionRunsStatusConds.add(new EntityExpr("currentStatusId", EntityOperator.EQUALS, "PRUN_COMPLETED"));
            findIncomingProductionRunsConds.add(new EntityConditionList(findIncomingProductionRunsStatusConds, EntityOperator.OR));

            EntityConditionList findIncomingProductionRunsCondition = new EntityConditionList(findIncomingProductionRunsConds, EntityOperator.AND);

            List incomingProductionRuns = delegator.findByCondition("WorkEffortAndGoods", findIncomingProductionRunsCondition, null, UtilMisc.toList("-estimatedCompletionDate"));
            Iterator incomingProductionRunsIter = incomingProductionRuns.iterator();
            while (incomingProductionRunsIter.hasNext()) {
                GenericValue incomingProductionRun = (GenericValue)incomingProductionRunsIter.next();

                double producedQtyTot = 0.0;
View Full Code Here

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

            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));

            EntityConditionList findOutgoingProductionRunsCondition = new EntityConditionList(findOutgoingProductionRunsConds, EntityOperator.AND);
            List outgoingProductionRuns = delegator.findByCondition("WorkEffortAndGoods", findOutgoingProductionRunsCondition, null, UtilMisc.toList("-estimatedStartDate"));
            Iterator outgoingProductionRunsIter = outgoingProductionRuns.iterator();
            while (outgoingProductionRunsIter.hasNext()) {
                GenericValue outgoingProductionRun = (GenericValue)outgoingProductionRunsIter.next();

                String weFacilityId = outgoingProductionRun.getString("facilityId");
View Full Code Here

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

        }
       
        EntityCondition conditionType = new EntityConditionList(condList, EntityOperator.OR);
        EntityCondition conditionMain = new EntityConditionList(UtilMisc.toList( new EntityExpr("contentIdTo", EntityOperator.EQUALS, contentIdTo), conditionType), EntityOperator.AND);
         try {
             List listAll = delegator.findByCondition("ContentAssoc", conditionMain, null, UtilMisc.toList("sequenceNum", "fromDate", "createdDate"));
             List listFiltered = EntityUtil.filterByDate(listAll);
             String contentId = (String)context.get("contentId");
             String dir = (String)context.get("dir");
             int seqNum = seqIncrement;
             String thisContentId = null;
View Full Code Here

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

        condList.add(expr);
        expr = new EntityExpr("caThruDate", EntityOperator.EQUALS, null);
        condList.add(expr);
        EntityConditionList entityCondList = new EntityConditionList(condList, EntityOperator.AND);
         try {
             List lst = delegator.findByCondition("ContentAssocDataResourceViewFrom", entityCondList, null, UtilMisc.toList("caSequenceNum", "caFromDate", "createdDate"));
             results.put("_LIST_", lst);
        } catch(GenericEntityException e) {
            Debug.logError(e, module);
            return ServiceUtil.returnError(e.getMessage());            
        }
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.