當前位置: 首頁>>代碼示例>>Java>>正文


Java DataModelConstants類代碼示例

本文整理匯總了Java中org.ofbiz.common.DataModelConstants的典型用法代碼示例。如果您正苦於以下問題:Java DataModelConstants類的具體用法?Java DataModelConstants怎麽用?Java DataModelConstants使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


DataModelConstants類屬於org.ofbiz.common包,在下文中一共展示了DataModelConstants類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getOrderHeaderAdjustments

import org.ofbiz.common.DataModelConstants; //導入依賴的package包/類
public static List<GenericValue> getOrderHeaderAdjustments(List<GenericValue> adjustments, String shipGroupSeqId) {
    List<EntityExpr> contraints1 = UtilMisc.toList(EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, null));
    List<EntityExpr> contraints2 = UtilMisc.toList(EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, DataModelConstants.SEQ_ID_NA));
    List<EntityExpr> contraints3 = UtilMisc.toList(EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, ""));
    List<EntityExpr> contraints4 = FastList.newInstance();
    if (shipGroupSeqId != null) {
        contraints4.add(EntityCondition.makeCondition("shipGroupSeqId", EntityOperator.EQUALS, shipGroupSeqId));
    }
    List<GenericValue> toFilter = null;
    List<GenericValue> adj = FastList.newInstance();

    if (shipGroupSeqId != null) {
        toFilter = EntityUtil.filterByAnd(adjustments, contraints4);
    } else {
        toFilter = adjustments;
    }

    adj.addAll(EntityUtil.filterByAnd(toFilter, contraints1));
    adj.addAll(EntityUtil.filterByAnd(toFilter, contraints2));
    adj.addAll(EntityUtil.filterByAnd(toFilter, contraints3));
    return adj;
}
 
開發者ID:ilscipio,項目名稱:scipio-erp,代碼行數:23,代碼來源:OrderReadHelper.java

示例2: getOrderHeaderStatuses

import org.ofbiz.common.DataModelConstants; //導入依賴的package包/類
public static List<GenericValue> getOrderHeaderStatuses(List<GenericValue> orderStatuses) {
    List<EntityExpr> contraints1 = UtilMisc.toList(EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, null));
    contraints1.add(EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, DataModelConstants.SEQ_ID_NA));
    contraints1.add(EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, ""));

    List<EntityExpr> contraints2 = UtilMisc.toList(EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS, null));
    contraints2.add(EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS, DataModelConstants.SEQ_ID_NA));
    contraints2.add(EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS, ""));

    List<GenericValue> newOrderStatuses = FastList.newInstance();
    newOrderStatuses.addAll(EntityUtil.filterByOr(orderStatuses, contraints1));
    return EntityUtil.orderBy(EntityUtil.filterByOr(newOrderStatuses, contraints2), UtilMisc.toList("-statusDatetime"));
}
 
開發者ID:ilscipio,項目名稱:scipio-erp,代碼行數:14,代碼來源:OrderReadHelper.java

示例3: getOrderItemStatuses

import org.ofbiz.common.DataModelConstants; //導入依賴的package包/類
public static List<GenericValue> getOrderItemStatuses(GenericValue orderItem, List<GenericValue> orderStatuses) {
    List<EntityExpr> contraints1 = UtilMisc.toList(EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, orderItem.get("orderItemSeqId")));
    List<EntityExpr> contraints2 = UtilMisc.toList(EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS, null));
    contraints2.add(EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS, DataModelConstants.SEQ_ID_NA));
    contraints2.add(EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS, ""));

    List<GenericValue> newOrderStatuses = FastList.newInstance();
    newOrderStatuses.addAll(EntityUtil.filterByAnd(orderStatuses, contraints1));
    return EntityUtil.orderBy(EntityUtil.filterByOr(newOrderStatuses, contraints2), UtilMisc.toList("-statusDatetime"));
}
 
開發者ID:ilscipio,項目名稱:scipio-erp,代碼行數:11,代碼來源:OrderReadHelper.java

示例4: getOrderPaymentStatuses

import org.ofbiz.common.DataModelConstants; //導入依賴的package包/類
public static List<GenericValue> getOrderPaymentStatuses(List<GenericValue> orderStatuses) {
    List<EntityExpr> contraints1 = UtilMisc.toList(EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, null));
    contraints1.add(EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, DataModelConstants.SEQ_ID_NA));
    contraints1.add(EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, ""));

    List<EntityExpr> contraints2 = UtilMisc.toList(EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.NOT_EQUAL, null));
    List<GenericValue> newOrderStatuses = FastList.newInstance();
    newOrderStatuses.addAll(EntityUtil.filterByOr(orderStatuses, contraints1));

    return EntityUtil.orderBy(EntityUtil.filterByAnd(newOrderStatuses, contraints2), UtilMisc.toList("-statusDatetime"));
}
 
開發者ID:ilscipio,項目名稱:scipio-erp,代碼行數:12,代碼來源:OrderReadHelper.java

示例5: getOrderGlobalAdjustments

import org.ofbiz.common.DataModelConstants; //導入依賴的package包/類
public BigDecimal getOrderGlobalAdjustments() {
    List cartAdjustments = this.getAdjustments();
    List tempAdjustmentsList = FastList.newInstance();
    if (cartAdjustments != null) {
        Iterator<GenericValue> cartAdjustmentIter = cartAdjustments.iterator();
        while (cartAdjustmentIter.hasNext()) {
            GenericValue checkOrderAdjustment = (GenericValue) cartAdjustmentIter.next();
            if (UtilValidate.isEmpty(checkOrderAdjustment.getString("shipGroupSeqId")) || DataModelConstants.SEQ_ID_NA.equals(checkOrderAdjustment.getString("shipGroupSeqId"))) {
                tempAdjustmentsList.add(checkOrderAdjustment);
            }
        }
    }
    return OrderReadHelper.calcOrderAdjustments(tempAdjustmentsList, this.getSubTotal(), false, true, true);
}
 
開發者ID:ilscipio,項目名稱:scipio-erp,代碼行數:15,代碼來源:ShoppingCart.java

示例6: getOrderGlobalAdjusments

import org.ofbiz.common.DataModelConstants; //導入依賴的package包/類
public BigDecimal getOrderGlobalAdjusments() {
    List cartAdjustments = this.getAdjustments();
    List tempAdjustmentsList = FastList.newInstance();
    if (cartAdjustments != null) {
        Iterator cartAdjustmentIter = cartAdjustments.iterator();
        while (cartAdjustmentIter.hasNext()) {
            GenericValue checkOrderAdjustment = (GenericValue) cartAdjustmentIter.next();
            if (UtilValidate.isEmpty(checkOrderAdjustment.getString("shipGroupSeqId")) || DataModelConstants.SEQ_ID_NA.equals(checkOrderAdjustment.getString("shipGroupSeqId"))) {
                tempAdjustmentsList.add(checkOrderAdjustment);
            }
        }
    }
    return OrderReadHelper.calcOrderAdjustments(tempAdjustmentsList, this.getSubTotal(), false, true, true);
}
 
開發者ID:gildaslemoal,項目名稱:elpi,代碼行數:15,代碼來源:ShoppingCart.java


注:本文中的org.ofbiz.common.DataModelConstants類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。