本文整理匯總了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;
}
示例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"));
}
示例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"));
}
示例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"));
}
示例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);
}
示例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);
}