s/new Number/Number.valueOf/g

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@771135 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Adam Heath
2009-05-03 22:40:37 +00:00
parent 2ec0d94197
commit 00a2f8dace
27 changed files with 102 additions and 102 deletions
@@ -169,7 +169,7 @@ public class AgreementServices {
"currencyUomId", agreementItem.getString("currencyUomId"),
"productId", productId);
if (days >= 0) {
partyCommissionResult.put("days", new Long(days));
partyCommissionResult.put("days", Long.valueOf(days));
}
commissions.add(partyCommissionResult);
}
@@ -228,7 +228,7 @@ public class FinAccountPaymentServices {
if (finAccountSettings != null && finAccountSettings.getLong("authValidDays") != null) {
thruDate = UtilDateTime.getDayEnd(UtilDateTime.nowTimestamp(), finAccountSettings.getLong("authValidDays"));
} else {
thruDate = UtilDateTime.getDayEnd(UtilDateTime.nowTimestamp(), new Long(30)); // default 30 days for an auth
thruDate = UtilDateTime.getDayEnd(UtilDateTime.nowTimestamp(), Long.valueOf(30)); // default 30 days for an auth
}
Map<String, Object> tmpResult = dispatcher.runSync("createFinAccountAuth", UtilMisc.<String, Object>toMap("finAccountId", finAccountId,
@@ -129,11 +129,11 @@ public class PaymentGatewayServices {
// get the process attempts so far
Long procAttempt = orderPaymentPreference.getLong("processAttempt");
if (procAttempt == null) {
procAttempt = new Long(0);
procAttempt = Long.valueOf(0);
}
// update the process attempt count
orderPaymentPreference.set("processAttempt", new Long(procAttempt.longValue() + 1));
orderPaymentPreference.set("processAttempt", Long.valueOf(procAttempt.longValue() + 1));
try {
orderPaymentPreference.store();
orderPaymentPreference.refresh();
@@ -1879,18 +1879,18 @@ public class PaymentGatewayServices {
if (creditCard != null) {
Long consecutiveFailedAuths = creditCard.getLong("consecutiveFailedAuths");
if (consecutiveFailedAuths == null) {
creditCard.set("consecutiveFailedAuths", new Long(1));
creditCard.set("consecutiveFailedAuths", Long.valueOf(1));
} else {
creditCard.set("consecutiveFailedAuths", new Long(consecutiveFailedAuths.longValue() + 1));
creditCard.set("consecutiveFailedAuths", Long.valueOf(consecutiveFailedAuths.longValue() + 1));
}
creditCard.set("lastFailedAuthDate", nowTimestamp);
if (Boolean.TRUE.equals((Boolean) context.get("resultNsf"))) {
Long consecutiveFailedNsf = creditCard.getLong("consecutiveFailedNsf");
if (consecutiveFailedNsf == null) {
creditCard.set("consecutiveFailedNsf", new Long(1));
creditCard.set("consecutiveFailedNsf", Long.valueOf(1));
} else {
creditCard.set("consecutiveFailedNsf", new Long(consecutiveFailedNsf.longValue() + 1));
creditCard.set("consecutiveFailedNsf", Long.valueOf(consecutiveFailedNsf.longValue() + 1));
}
creditCard.set("lastFailedNsfDate", nowTimestamp);
}
@@ -1901,9 +1901,9 @@ public class PaymentGatewayServices {
// auth was successful, to clear out any failed auth or nsf info
if (authResult.booleanValue()) {
if ((creditCard != null) && (creditCard.get("lastFailedAuthDate") != null)) {
creditCard.set("consecutiveFailedAuths", new Long(0));
creditCard.set("consecutiveFailedAuths", Long.valueOf(0));
creditCard.set("lastFailedAuthDate", null);
creditCard.set("consecutiveFailedNsf", new Long(0));
creditCard.set("consecutiveFailedNsf", Long.valueOf(0));
creditCard.set("lastFailedNsfDate", null);
creditCard.store();
}
@@ -2563,7 +2563,7 @@ public class PaymentGatewayServices {
// get a list of all payment prefs still pending
List<EntityExpr> exprs = UtilMisc.toList(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PAYMENT_NOT_AUTH"),
EntityCondition.makeCondition("processAttempt", EntityOperator.GREATER_THAN, new Long(0)));
EntityCondition.makeCondition("processAttempt", EntityOperator.GREATER_THAN, Long.valueOf(0)));
EntityListIterator eli = null;
try {
@@ -2927,7 +2927,7 @@ public class PaymentGatewayServices {
String transactionType = (String) context.get("transactionType");
String referenceCode = (String) context.get("referenceCode");
if (referenceCode == null) {
referenceCode = new Long(System.currentTimeMillis()).toString();
referenceCode = Long.valueOf(System.currentTimeMillis()).toString();
}
// Get the OrderPaymentPreference
GenericValue paymentPref = null;
@@ -153,7 +153,7 @@ public class ValueLinkServices {
Map request = vl.getInitialRequestMap(context);
request.put("Interface", "Encrypt");
request.put("EncryptKey", mwkHex);
request.put("EncryptID", new Long(vl.getWorkingKeyIndex().longValue() + 1));
request.put("EncryptID", Long.valueOf(vl.getWorkingKeyIndex().longValue() + 1));
// send the request
Map response = null;
@@ -252,7 +252,7 @@ public class SelectRespServlet extends SelectServlet implements SelectDefs {
} else {
paymentPreference.set("statusId", "PAYMENT_CANCELLED");
}
Long transTimeLong = new Long(transTime);
Long transTimeLong = Long.valueOf(transTime);
java.sql.Timestamp authDate = new java.sql.Timestamp(transTimeLong.longValue());
paymentPreference.set("avsCode", avsCode);
@@ -107,7 +107,7 @@ public class BOMServices {
} catch (GenericEntityException gee) {
return ServiceUtil.returnError("Error running max depth algorithm: " + gee.getMessage());
}
result.put("depth", new Long(maxDepth));
result.put("depth", Long.valueOf(maxDepth));
return result;
}
@@ -159,7 +159,7 @@ public class BOMServices {
}
}
if (virtualMaxDepth > llc.intValue()) {
llc = new Long(virtualMaxDepth);
llc = Long.valueOf(virtualMaxDepth);
}
product.set("billOfMaterialLevel", llc);
product.store();
@@ -176,7 +176,7 @@ public class BOMServices {
lev = oneProduct.getLong("billOfMaterialLevel").intValue();
}
if (lev < oneNode.getDepth()) {
oneProduct.set("billOfMaterialLevel", new Long(oneNode.getDepth()));
oneProduct.set("billOfMaterialLevel", Long.valueOf(oneNode.getDepth()));
oneProduct.store();
}
}
@@ -213,7 +213,7 @@ public class BOMServices {
try {
List products = delegator.findList("Product", null, null, UtilMisc.toList("isVirtual DESC"), null, false);
Iterator productsIt = products.iterator();
Long zero = new Long(0);
Long zero = Long.valueOf(0);
List allProducts = new ArrayList();
while (productsIt.hasNext()) {
GenericValue product = (GenericValue)productsIt.next();
@@ -294,7 +294,7 @@ public class BOMServices {
BigDecimal quantity = (BigDecimal) context.get("quantity");
BigDecimal amount = (BigDecimal) context.get("amount");
if (type == null) {
type = new Integer(0);
type = Integer.valueOf(0);
}
Date fromDate = null;
@@ -584,7 +584,7 @@ public class BOMServices {
BOMNode component = (BOMNode)productsInPackages.get(j);
HashMap boxTypeContentMap = new HashMap();
boxTypeContentMap.put("content", orderShipmentReadMap);
boxTypeContentMap.put("componentIndex", new Integer(j));
boxTypeContentMap.put("componentIndex", Integer.valueOf(j));
GenericValue product = component.getProduct();
String boxTypeId = product.getString("shipmentBoxTypeId");
if (boxTypeId != null) {
@@ -276,7 +276,7 @@ public class ProductionRun {
*/
public Timestamp recalculateEstimatedCompletionDate() {
this.updateCompletionDate = false;
return recalculateEstimatedCompletionDate(new Long(0), estimatedStartDate);
return recalculateEstimatedCompletionDate(Long.valueOf(0), estimatedStartDate);
}
/**
* get the productionRunName property.
@@ -833,7 +833,7 @@ public class ProductionRunServices {
if (theTask.get("actualMilliSeconds") == null) {
Double autoMillis = null;
if (theTask.get("estimatedMilliSeconds") != null) {
autoMillis = new Double(quantityProduced.doubleValue() * theTask.getDouble("estimatedMilliSeconds"));
autoMillis = Double.valueOf(quantityProduced.doubleValue() * theTask.getDouble("estimatedMilliSeconds"));
}
serviceContext.put("actualMilliSeconds", autoMillis);
}
@@ -1898,10 +1898,10 @@ public class ProductionRunServices {
addQuantityRejected = BigDecimal.ZERO;
}
if (addSetupTime == null) {
addSetupTime = new Double(0);
addSetupTime = Double.valueOf(0);
}
if (addTaskTime == null) {
addTaskTime = new Double(0);
addTaskTime = Double.valueOf(0);
}
if (comments == null) {
comments = "";
@@ -1933,11 +1933,11 @@ public class ProductionRunServices {
Double actualMilliSeconds = theTask.getDouble("actualMilliSeconds");
if (actualMilliSeconds == null) {
actualMilliSeconds = new Double(0);
actualMilliSeconds = Double.valueOf(0);
}
Double actualSetupMillis = theTask.getDouble("actualSetupMillis");
if (actualSetupMillis == null) {
actualSetupMillis = new Double(0);
actualSetupMillis = Double.valueOf(0);
}
BigDecimal quantityProduced = theTask.getBigDecimal("quantityProduced");
@@ -2003,7 +2003,7 @@ public class ProductionRunServices {
String timeEntryId = delegator.getNextSeqId("TimeEntry");
Map timeEntryFields = UtilMisc.toMap("timeEntryId", timeEntryId,
"workEffortId", workEffortId);
Double totalTime = new Double(addSetupTime.doubleValue() + addTaskTime.doubleValue());
Double totalTime = Double.valueOf(addSetupTime.doubleValue() + addTaskTime.doubleValue());
timeEntryFields.put("partyId", partyId);
timeEntryFields.put("fromDate", fromDate);
timeEntryFields.put("thruDate", toDate);
@@ -2018,8 +2018,8 @@ public class ProductionRunServices {
Map serviceContext = new HashMap();
serviceContext.clear();
serviceContext.put("workEffortId", workEffortId);
serviceContext.put("actualMilliSeconds", new Double(totalMillis));
serviceContext.put("actualSetupMillis", new Double(totalSetupMillis));
serviceContext.put("actualMilliSeconds", Double.valueOf(totalMillis));
serviceContext.put("actualSetupMillis", Double.valueOf(totalSetupMillis));
serviceContext.put("quantityProduced", totalQuantityProduced);
serviceContext.put("quantityRejected", totalQuantityRejected);
serviceContext.put("userLogin", userLogin);
@@ -685,9 +685,9 @@ public class MrpServices {
if (bomLevel == 0) {
filterByConditions = EntityCondition.makeCondition(EntityCondition.makeCondition("billOfMaterialLevel", EntityOperator.EQUALS, null),
EntityOperator.OR,
EntityCondition.makeCondition("billOfMaterialLevel", EntityOperator.EQUALS, new Long(bomLevel)));
EntityCondition.makeCondition("billOfMaterialLevel", EntityOperator.EQUALS, Long.valueOf(bomLevel)));
} else {
filterByConditions = EntityCondition.makeCondition("billOfMaterialLevel", EntityOperator.EQUALS, new Long(bomLevel));
filterByConditions = EntityCondition.makeCondition("billOfMaterialLevel", EntityOperator.EQUALS, Long.valueOf(bomLevel));
}
try {
listInventoryEventForMRP = delegator.findList("MrpEventView", filterByConditions, null, UtilMisc.toList("productId", "eventDate"), null, false);
@@ -170,7 +170,7 @@ public class ProposedOrder {
* This is a work in progress
GenericValue routingTask = null;
try {
Map timeInMap = UtilMisc.toMap("taskId", routingTaskAssoc.getString("workEffortIdTo"), "quantity", new Double(quantity), "userLogin", userLogin);
Map timeInMap = UtilMisc.toMap("taskId", routingTaskAssoc.getString("workEffortIdTo"), "quantity", Double.valueOf(quantity), "userLogin", userLogin);
Map timeOutMap = dispatcher.runSync("getEstimatedTaskTime", timeInMap);
routingTask = (GenericValue)timeOutMap.get("routing");
} catch (GenericServiceException gse) {
@@ -72,7 +72,7 @@ public class RoutingServices {
// FIXME: the ProductionRun.getEstimatedTaskTime(...) method will be removed and
// its logic will be implemented inside this method.
long estimatedTaskTime = ProductionRun.getEstimatedTaskTime(task, quantity, productId, routingId, dispatcher);
result.put("estimatedTaskTime", new Long(estimatedTaskTime));
result.put("estimatedTaskTime", Long.valueOf(estimatedTaskTime));
if (task != null && task.get("estimatedSetupMillis") != null) {
result.put("setupTime", task.getDouble("estimatedSetupMillis"));
}
@@ -245,7 +245,7 @@ public class TechDataServices {
}
result.put("capacity",capacity);
result.put("startTime",startTime);
result.put("moveDay",new Integer(moveDay));
result.put("moveDay",Integer.valueOf(moveDay));
return result;
}
/** Used to to request the remain capacity available for dateFrom in a TechDataCalenda,
@@ -399,7 +399,7 @@ public class TechDataServices {
}
result.put("capacity",capacity);
result.put("startTime",startTime);
result.put("moveDay",new Integer(moveDay));
result.put("moveDay",Integer.valueOf(moveDay));
return result;
}
/** Used to request the remaining capacity available for dateFrom in a TechDataCalenda,
@@ -457,7 +457,7 @@ public class TechDataServices {
Time startTime = (Time) position.get("startTime");
int moveDay = ((Integer) position.get("moveDay")).intValue();
Double capacity = (Double) position.get("capacity");
dateTo = (moveDay == 0) ? dateFrom : UtilDateTime.getDayEnd(dateFrom, new Long(moveDay));
dateTo = (moveDay == 0) ? dateFrom : UtilDateTime.getDayEnd(dateFrom, Long.valueOf(moveDay));
Timestamp endAvailablePeriod = new Timestamp(UtilDateTime.getDayStart(dateTo).getTime() + startTime.getTime() + capacity.longValue() + cDateTrav.get(Calendar.ZONE_OFFSET) + cDateTrav.get(Calendar.DST_OFFSET));
if (dateTo.after(endAvailablePeriod) ) {
dateTo = endAvailablePeriod;
@@ -530,15 +530,15 @@ public class OrderLookupServices {
// format the param list
String paramString = StringUtil.join(paramList, "&amp;");
result.put("highIndex", new Integer(highIndex));
result.put("lowIndex", new Integer(lowIndex));
result.put("highIndex", Integer.valueOf(highIndex));
result.put("lowIndex", Integer.valueOf(lowIndex));
result.put("viewIndex", viewIndex);
result.put("viewSize", viewSize);
result.put("showAll", showAll);
result.put("paramList", (paramString != null? paramString: ""));
result.put("orderList", orderList);
result.put("orderListSize", new Integer(orderCount));
result.put("orderListSize", Integer.valueOf(orderCount));
return result;
}
@@ -1229,7 +1229,7 @@ public class OrderReadHelper {
itemInfo.put("quantity", getOrderItemQuantity(item));
itemInfo.put("weight", this.getItemWeight(item));
itemInfo.put("size", this.getItemSize(item));
itemInfo.put("piecesIncluded", new Long(this.getItemPiecesIncluded(item)));
itemInfo.put("piecesIncluded", Long.valueOf(this.getItemPiecesIncluded(item)));
itemInfo.put("featureSet", this.getItemFeatureSet(item));
return itemInfo;
}
@@ -405,7 +405,7 @@ public class OrderReturnServices {
), EntityOperator.AND);
/*
EntityConditionList havingConditions = EntityCondition.makeCondition(UtilMisc.toList(
EntityCondition.makeCondition("quantityIssued", EntityOperator.GREATER_THAN, new Double(0))
EntityCondition.makeCondition("quantityIssued", EntityOperator.GREATER_THAN, Double.valueOf(0))
), EntityOperator.AND);
*/
List orderItemQuantitiesIssued = null;
@@ -4153,7 +4153,7 @@ public class OrderServices {
paymentParams.put("paymentTypeId", "CUSTOMER_REFUND"); // JLR 17/7/4 from a suggestion of Si cf. https://issues.apache.org/jira/browse/OFBIZ-828#action_12483045
paymentParams.put("paymentMethodTypeId", orderPaymentPreference.getString("paymentMethodTypeId")); // JLR 20/7/4 Finally reverted for now, I prefer to see an amount in payment, even negative
paymentParams.put("paymentPreferenceId", orderPaymentPreference.getString("orderPaymentPreferenceId"));
paymentParams.put("amount", new Double(Math.abs(maxAmount)));
paymentParams.put("amount", Double.valueOf(Math.abs(maxAmount)));
paymentParams.put("statusId", "PMNT_RECEIVED");
paymentParams.put("effectiveDate", UtilDateTime.nowTimestamp());
paymentParams.put("partyIdFrom", payToPartyId);
@@ -5064,7 +5064,7 @@ public class OrderServices {
Debug.logWarning("Don't know anything about useTimeUomId [" + subscription.getString("canclAutmExtTimeUomId") + "], defaulting to month", module);
}
endDate.add(field, new Integer(subscription.getString("canclAutmExtTime")).intValue());
endDate.add(field, Integer.valueOf(subscription.getString("canclAutmExtTime")).intValue());
}
Calendar endDateSubscription = Calendar.getInstance();
@@ -186,7 +186,7 @@ public class RequirementServices {
Map results = ServiceUtil.returnSuccess();
results.put("requirementsForSupplier", requirements);
results.put("distinctProductCount", new Integer(products.size()));
results.put("distinctProductCount", Integer.valueOf(products.size()));
results.put("quantityTotal", quantity);
results.put("amountTotal", amountTotal);
return results;
@@ -83,7 +83,7 @@ public class CartEventListener implements HttpSessionListener {
GenericValue cartAbandonedLine = delegator.makeValue("CartAbandonedLine");
cartAbandonedLine.set("visitId", visit.get("visitId"));
cartAbandonedLine.set("cartAbandonedLineSeqId", (new Integer(seqId)).toString());
cartAbandonedLine.set("cartAbandonedLineSeqId", (Integer.valueOf(seqId)).toString());
cartAbandonedLine.set("productId", cartItem.getProductId());
cartAbandonedLine.set("prodCatalogId", cartItem.getProdCatalogId());
cartAbandonedLine.set("quantity", cartItem.getQuantity());
@@ -519,12 +519,12 @@ public class ShoppingCart implements Serializable {
//GenericValue productSupplier = null;
supplierProduct = getSupplierProduct(productId, quantity, dispatcher);
if (supplierProduct != null || "_NA_".equals(this.getPartyId())) {
return this.addItem(0, ShoppingCartItem.makePurchaseOrderItem(new Integer(0), productId, selectedAmount, quantity, features, attributes, prodCatalogId, configWrapper, itemType, itemGroup, dispatcher, this, supplierProduct, shipBeforeDate, shipAfterDate, cancelBackOrderDate));
return this.addItem(0, ShoppingCartItem.makePurchaseOrderItem(Integer.valueOf(0), productId, selectedAmount, quantity, features, attributes, prodCatalogId, configWrapper, itemType, itemGroup, dispatcher, this, supplierProduct, shipBeforeDate, shipAfterDate, cancelBackOrderDate));
} else {
throw new CartItemModifyException("SupplierProduct not found");
}
} else {
return this.addItem(0, ShoppingCartItem.makeItem(new Integer(0), productId, selectedAmount, quantity, null,
return this.addItem(0, ShoppingCartItem.makeItem(Integer.valueOf(0), productId, selectedAmount, quantity, null,
reservStart, reservLength, reservPersons, accommodationMapId, accommodationSpotId, shipBeforeDate, shipAfterDate,
features, attributes, prodCatalogId, configWrapper, itemType, itemGroup, dispatcher,
this, Boolean.TRUE, Boolean.TRUE, parentProductId, Boolean.FALSE, Boolean.FALSE));
@@ -538,7 +538,7 @@ public class ShoppingCart implements Serializable {
public int addNonProductItem(String itemType, String description, String categoryId, BigDecimal price, BigDecimal quantity,
Map attributes, String prodCatalogId, String itemGroupNumber, LocalDispatcher dispatcher) throws CartItemModifyException {
ShoppingCart.ShoppingCartItemGroup itemGroup = this.getItemGroupByNumber(itemGroupNumber);
return this.addItem(0, ShoppingCartItem.makeItem(new Integer(0), itemType, description, categoryId, price, null, quantity, attributes, prodCatalogId, itemGroup, dispatcher, this, Boolean.TRUE));
return this.addItem(0, ShoppingCartItem.makeItem(Integer.valueOf(0), itemType, description, categoryId, price, null, quantity, attributes, prodCatalogId, itemGroup, dispatcher, this, Boolean.TRUE));
}
/** Add an item to the shopping cart. */
@@ -1927,7 +1927,7 @@ public class ShoppingCart implements Serializable {
CartShipInfo.CartShipItemInfo csii = (CartShipInfo.CartShipItemInfo) csi.shipItemInfo.get(item);
if (csii != null) {
if (this.checkShipItemInfo(csi, csii)) {
shipGroups.put(new Integer(i), csii.quantity);
shipGroups.put(Integer.valueOf(i), csii.quantity);
}
}
}
@@ -3513,7 +3513,7 @@ public class ShoppingCart implements Serializable {
/*
if ((productPromoAction.get("productId") == null || productPromoAction.getString("productId").equals(this.getShipmentMethodTypeId())) &&
(productPromoAction.get("partyId") == null || productPromoAction.getString("partyId").equals(this.getCarrierPartyId()))) {
Double shippingAmount = new Double(OrderReadHelper.calcOrderAdjustment(orderAdjustment, new BigDecimal(getSubTotal())).negate().doubleValue());
Double shippingAmount = Double.valueOf(OrderReadHelper.calcOrderAdjustment(orderAdjustment, new BigDecimal(getSubTotal())).negate().doubleValue());
// always set orderAdjustmentTypeId to SHIPPING_CHARGES for free shipping adjustments
GenericValue fsOrderAdjustment = getDelegator().makeValue("OrderAdjustment",
UtilMisc.toMap("orderItemSeqId", orderAdjustment.get("orderItemSeqId"), "orderAdjustmentTypeId", "SHIPPING_CHARGES", "amount", shippingAmount,
@@ -3556,7 +3556,7 @@ public class ShoppingCart implements Serializable {
/*
if ((productPromoAction.get("productId") == null || productPromoAction.getString("productId").equals(item.getShipmentMethodTypeId())) &&
(productPromoAction.get("partyId") == null || productPromoAction.getString("partyId").equals(item.getCarrierPartyId()))) {
Double shippingAmount = new Double(OrderReadHelper.calcItemAdjustment(orderAdjustment, new BigDecimal(item.getQuantity()), new BigDecimal(item.getItemSubTotal())).negate().doubleValue());
Double shippingAmount = Double.valueOf(OrderReadHelper.calcItemAdjustment(orderAdjustment, new BigDecimal(item.getQuantity()), new BigDecimal(item.getItemSubTotal())).negate().doubleValue());
// always set orderAdjustmentTypeId to SHIPPING_CHARGES for free shipping adjustments
GenericValue fsOrderAdjustment = getDelegator().makeValue("OrderAdjustment",
UtilMisc.toMap("orderItemSeqId", orderAdjustment.get("orderItemSeqId"), "orderAdjustmentTypeId", "SHIPPING_CHARGES", "amount", shippingAmount,
@@ -3997,7 +3997,7 @@ public class ShoppingCart implements Serializable {
CartShipInfo csi = (CartShipInfo) shipInfo.get(i);
if ((csi.supplierPartyId == null && supplierPartyId == null) ||
(UtilValidate.isNotEmpty(csi.supplierPartyId) && csi.supplierPartyId.equals(supplierPartyId))) {
shipGroups.put(new Integer(i), csi);
shipGroups.put(Integer.valueOf(i), csi);
}
}
return shipGroups;
@@ -4113,7 +4113,7 @@ public class ShoppingCart implements Serializable {
if (! supplierCartItems.containsKey(cartItem)) supplierCartItems.put(cartItem, new HashMap());
Map cartItemGroupQuantities = (Map) supplierCartItems.get(cartItem);
cartItemGroupQuantities.put(new Integer(shipGroupIndex), dropShipQuantity);
cartItemGroupQuantities.put(Integer.valueOf(shipGroupIndex), dropShipQuantity);
}
}
@@ -1189,7 +1189,7 @@ public class ShoppingCartEvents {
return "error";
}
if (termDays != null) {
termDays = new Long(termDaysStr);
termDays = Long.valueOf(termDaysStr);
}
if ((termIndex != null) && (!"-1".equals(termIndex)) && (UtilValidate.isInteger(termIndex))) {
cartHelper.removeOrderTerm(Integer.parseInt(termIndex));
@@ -1855,4 +1855,4 @@ public class ShoppingCartEvents {
request.setAttribute("orderId", orderId);
return "success";
}
}
}
@@ -1043,7 +1043,7 @@ public class ShoppingCartItem implements java.io.Serializable {
Map supplierProductsResult = null;
try {
supplierProductsResult = dispatcher.runSync("getSuppliersForProduct", UtilMisc.toMap("productId", _product.getString("productId"),
"quantity", new Double(quantity),
"quantity", Double.valueOf(quantity),
"currencyUomId", cart.getCurrency(),
"canDropShip", "Y",
"userLogin", cart.getUserLogin()));
@@ -1858,7 +1858,7 @@ public class ShoppingCartItem implements java.io.Serializable {
itemInfo.put("productId", this.getProductId());
itemInfo.put("weight", this.getWeight());
itemInfo.put("size", this.getSize());
itemInfo.put("piecesIncluded", new Long(this.getPiecesIncluded()));
itemInfo.put("piecesIncluded", Long.valueOf(this.getPiecesIncluded()));
itemInfo.put("featureSet", this.getFeatureSet());
GenericValue product = getProduct();
if (product != null) {
@@ -200,8 +200,8 @@ public class ProductDisplayWorker {
Integer curOcc = (Integer) productOccurances.get(product.get("productId"));
if (curOcc == null) curOcc = new Integer(0);
productOccurances.put(product.get("productId"), new Integer(curOcc.intValue() + 1));
if (curOcc == null) curOcc = Integer.valueOf(0);
productOccurances.put(product.get("productId"), Integer.valueOf(curOcc.intValue() + 1));
}
}
}
@@ -459,7 +459,7 @@ public class ProductPromoWorker {
}
long perCustomerThisOrder = useLimitPerCustomer.longValue() - productPromoCustomerUseSize;
if (candidateUseLimit == null || candidateUseLimit.longValue() > perCustomerThisOrder) {
candidateUseLimit = new Long(perCustomerThisOrder);
candidateUseLimit = Long.valueOf(perCustomerThisOrder);
}
}
@@ -475,7 +475,7 @@ public class ProductPromoWorker {
long productPromoUseSize = delegator.findCountByCondition("ProductPromoUseCheck", checkCondition, null, null);
long perPromotionThisOrder = useLimitPerPromotion.longValue() - productPromoUseSize;
if (candidateUseLimit == null || candidateUseLimit.longValue() > perPromotionThisOrder) {
candidateUseLimit = new Long(perPromotionThisOrder);
candidateUseLimit = Long.valueOf(perPromotionThisOrder);
}
}
@@ -503,7 +503,7 @@ public class ProductPromoWorker {
}
long perCustomerThisOrder = codeUseLimitPerCustomer.longValue() - productPromoCustomerUseSize;
if (codeUseLimit == null || codeUseLimit.longValue() > perCustomerThisOrder) {
codeUseLimit = new Long(perCustomerThisOrder);
codeUseLimit = Long.valueOf(perCustomerThisOrder);
}
}
@@ -517,7 +517,7 @@ public class ProductPromoWorker {
long productPromoCodeUseSize = delegator.findCountByCondition("ProductPromoUseCheck", checkCondition, null, null);
long perCodeThisOrder = codeUseLimitPerCode.longValue() - productPromoCodeUseSize;
if (codeUseLimit == null || codeUseLimit.longValue() > perCodeThisOrder) {
codeUseLimit = new Long(perCodeThisOrder);
codeUseLimit = Long.valueOf(perCodeThisOrder);
}
}
@@ -815,10 +815,10 @@ public class ProductPromoWorker {
if (amountNeeded.compareTo(BigDecimal.ZERO) > 0) {
// failed, reset the entire rule, ie including all other conditions that might have been done before
cart.resetPromoRuleUse(productPromoCond.getString("productPromoId"), productPromoCond.getString("productPromoRuleId"));
compareBase = new Integer(-1);
compareBase = Integer.valueOf(-1);
} else {
// we got it, the conditions are in place...
compareBase = new Integer(0);
compareBase = Integer.valueOf(0);
// NOTE: don't confirm promo rule use here, wait until actions are complete for the rule to do that
}
} else if ("PPIP_PRODUCT_TOTAL".equals(inputParamEnumId)) {
@@ -848,7 +848,7 @@ public class ProductPromoWorker {
// Debug.logInfo("Doing Amount Not Counted Cond with Value after finding applicable cart lines: " + amountNeeded, module);
compareBase = new Integer(amountAvailable.compareTo(amountNeeded));
compareBase = Integer.valueOf(amountAvailable.compareTo(amountNeeded));
} else if ("PPIP_PRODUCT_QUANT".equals(inputParamEnumId)) {
// for this type of promo force the operatorEnumId = PPC_EQ, effectively ignore that setting because the comparison is implied in the code
operatorEnumId = "PPC_EQ";
@@ -879,10 +879,10 @@ public class ProductPromoWorker {
if (quantityNeeded.compareTo(BigDecimal.ZERO) > 0) {
// failed, reset the entire rule, ie including all other conditions that might have been done before
cart.resetPromoRuleUse(productPromoCond.getString("productPromoId"), productPromoCond.getString("productPromoRuleId"));
compareBase = new Integer(-1);
compareBase = Integer.valueOf(-1);
} else {
// we got it, the conditions are in place...
compareBase = new Integer(0);
compareBase = Integer.valueOf(0);
// NOTE: don't confirm rpomo rule use here, wait until actions are complete for the rule to do that
}
@@ -892,7 +892,7 @@ public class ProductPromoWorker {
if (candidateProductId == null) {
// if null, then it's not in the cart
compareBase = new Integer(1);
compareBase = Integer.valueOf(1);
} else {
// Debug.logInfo("Testing to see if productId \"" + candidateProductId + "\" is in the cart", module);
List productCartItems = cart.findAllCartItems(candidateProductId);
@@ -906,10 +906,10 @@ public class ProductPromoWorker {
if (productCartItems.size() > 0) {
//Debug.logError("Item with productId \"" + candidateProductId + "\" IS in the cart", module);
compareBase = new Integer(0);
compareBase = Integer.valueOf(0);
} else {
//Debug.logError("Item with productId \"" + candidateProductId + "\" IS NOT in the cart", module);
compareBase = new Integer(1);
compareBase = Integer.valueOf(1);
}
}
} else if ("PPIP_CATEGORY_ID_IC".equals(inputParamEnumId)) {
@@ -924,7 +924,7 @@ public class ProductPromoWorker {
}
}
compareBase = new Integer(1);
compareBase = Integer.valueOf(1);
// NOTE: this technique is efficient for a smaller number of items in the cart, if there are a lot of lines
//in the cart then a non-cached query with a set of productIds using the IN operator would be better
Iterator productIdIter = productIds.iterator();
@@ -938,7 +938,7 @@ public class ProductPromoWorker {
if (UtilValidate.isNotEmpty(productCategoryMembers)) {
// if any product is in category, set true and break
// then 0 (equals), otherwise 1 (not equals)
compareBase = new Integer(0);
compareBase = Integer.valueOf(0);
break;
}
}
@@ -952,17 +952,17 @@ public class ProductPromoWorker {
compareBase = acctDays.compareTo(new BigDecimal(condValue));
} else if ("PPIP_PARTY_ID".equals(inputParamEnumId)) {
if (partyId != null) {
compareBase = new Integer(partyId.compareTo(condValue));
compareBase = Integer.valueOf(partyId.compareTo(condValue));
} else {
compareBase = new Integer(1);
compareBase = Integer.valueOf(1);
}
} else if ("PPIP_PARTY_GRP_MEM".equals(inputParamEnumId)) {
if (UtilValidate.isEmpty(partyId)) {
compareBase = new Integer(1);
compareBase = Integer.valueOf(1);
} else {
String groupPartyId = condValue;
if (partyId.equals(groupPartyId)) {
compareBase = new Integer(0);
compareBase = Integer.valueOf(0);
} else {
// look for PartyRelationship with partyRelationshipTypeId=GROUP_ROLLUP, the partyIdTo is the group member, so the partyIdFrom is the groupPartyId
List partyRelationshipList = delegator.findByAndCache("PartyRelationship", UtilMisc.toMap("partyIdFrom", groupPartyId, "partyIdTo", partyId, "partyRelationshipTypeId", "GROUP_ROLLUP"));
@@ -970,15 +970,15 @@ public class ProductPromoWorker {
partyRelationshipList = EntityUtil.filterByDate(partyRelationshipList, true);
// then 0 (equals), otherwise 1 (not equals)
if (UtilValidate.isNotEmpty(partyRelationshipList)) {
compareBase = new Integer(0);
compareBase = Integer.valueOf(0);
} else {
compareBase = new Integer(1);
compareBase = Integer.valueOf(1);
}
}
}
} else if ("PPIP_PARTY_CLASS".equals(inputParamEnumId)) {
if (UtilValidate.isEmpty(partyId)) {
compareBase = new Integer(1);
compareBase = Integer.valueOf(1);
} else {
String partyClassificationGroupId = condValue;
// find any PartyClassification
@@ -987,9 +987,9 @@ public class ProductPromoWorker {
partyClassificationList = EntityUtil.filterByDate(partyClassificationList, true);
// then 0 (equals), otherwise 1 (not equals)
if (UtilValidate.isNotEmpty(partyClassificationList)) {
compareBase = new Integer(0);
compareBase = Integer.valueOf(0);
} else {
compareBase = new Integer(1);
compareBase = Integer.valueOf(1);
}
}
} else if ("PPIP_ROLE_TYPE".equals(inputParamEnumId)) {
@@ -1000,17 +1000,17 @@ public class ProductPromoWorker {
// then 0 (equals), otherwise 1 (not equals)
if (partyRole != null) {
compareBase = new Integer(0);
compareBase = Integer.valueOf(0);
} else {
compareBase = new Integer(1);
compareBase = Integer.valueOf(1);
}
} else {
compareBase = new Integer(1);
compareBase = Integer.valueOf(1);
}
} else if ("PPIP_ORDER_TOTAL".equals(inputParamEnumId)) {
BigDecimal orderSubTotal = cart.getSubTotalForPromotions();
if (Debug.verboseOn()) Debug.logVerbose("Doing order total compare: orderSubTotal=" + orderSubTotal, module);
compareBase = new Integer(orderSubTotal.compareTo(new BigDecimal(condValue)));
compareBase = Integer.valueOf(orderSubTotal.compareTo(new BigDecimal(condValue)));
} else if ("PPIP_ORST_HIST".equals(inputParamEnumId)) {
// description="Order sub-total X in last Y Months"
if (partyId != null && userLogin != null) {
@@ -1019,7 +1019,7 @@ public class ProductPromoWorker {
if (otherValue != null) {
monthsToInclude = Integer.parseInt(condValue);
}
Map serviceIn = UtilMisc.toMap("partyId", partyId, "roleTypeId", "PLACING_CUSTOMER", "orderTypeId", "SALES_ORDER", "statusId", "ORDER_COMPLETED", "monthsToInclude", new Integer(monthsToInclude), "userLogin", userLogin);
Map serviceIn = UtilMisc.toMap("partyId", partyId, "roleTypeId", "PLACING_CUSTOMER", "orderTypeId", "SALES_ORDER", "statusId", "ORDER_COMPLETED", "monthsToInclude", Integer.valueOf(monthsToInclude), "userLogin", userLogin);
try {
Map result = dispatcher.runSync("getOrderedSummaryInformation", serviceIn);
if (ServiceUtil.isError(result)) {
@@ -1028,7 +1028,7 @@ public class ProductPromoWorker {
} else {
BigDecimal orderSubTotal = (BigDecimal) result.get("totalSubRemainingAmount");
if (Debug.verboseOn()) Debug.logVerbose("Doing order history sub-total compare: orderSubTotal=" + orderSubTotal + ", for the last " + monthsToInclude + " months.", module);
compareBase = new Integer(orderSubTotal.compareTo(new BigDecimal(condValue)));
compareBase = Integer.valueOf(orderSubTotal.compareTo(new BigDecimal(condValue)));
}
} catch (GenericServiceException e) {
Debug.logError(e, "Error getting order history sub-total in the getOrderedSummaryInformation service, evaluating condition to false.", module);
@@ -1048,7 +1048,7 @@ public class ProductPromoWorker {
"roleTypeId", "PLACING_CUSTOMER",
"orderTypeId", "SALES_ORDER",
"statusId", "ORDER_COMPLETED",
"monthsToInclude", new Integer(monthsToInclude),
"monthsToInclude", Integer.valueOf(monthsToInclude),
"userLogin", userLogin);
try {
Map result = dispatcher.runSync("getOrderedSummaryInformation", serviceIn);
@@ -1058,7 +1058,7 @@ public class ProductPromoWorker {
} else {
BigDecimal orderSubTotal = (BigDecimal) result.get("totalSubRemainingAmount");
if (Debug.verboseOn()) Debug.logVerbose("Doing order history sub-total compare: orderSubTotal=" + orderSubTotal + ", for the last " + monthsToInclude + " months.", module);
compareBase = new Integer(orderSubTotal.compareTo(new BigDecimal((condValue))));
compareBase = Integer.valueOf(orderSubTotal.compareTo(new BigDecimal((condValue))));
}
} catch (GenericServiceException e) {
Debug.logError(e, "Error getting order history sub-total in the getOrderedSummaryInformation service, evaluating condition to false.", module);
@@ -1094,7 +1094,7 @@ public class ProductPromoWorker {
} else {
Double orderSubTotal = (Double) result.get("totalSubRemainingAmount");
if (Debug.verboseOn()) Debug.logVerbose("Doing order history sub-total compare: orderSubTotal=" + orderSubTotal + ", for last year.", module);
compareBase = new Integer(orderSubTotal.compareTo(Double.valueOf(condValue)));
compareBase = Integer.valueOf(orderSubTotal.compareTo(Double.valueOf(condValue)));
}
} catch (GenericServiceException e) {
Debug.logError(e, "Error getting order history sub-total in the getOrderedSummaryInformation service, evaluating condition to false.", module);
@@ -1104,7 +1104,7 @@ public class ProductPromoWorker {
return false;
}
} else if ("PPIP_RECURRENCE".equals(inputParamEnumId)) {
compareBase = new Integer(1);
compareBase = Integer.valueOf(1);
GenericValue recurrenceInfo = delegator.findByPrimaryKeyCache("RecurrenceInfo", UtilMisc.toMap("recurrenceInfoId", condValue));
if (recurrenceInfo != null) {
RecurrenceInfo recurrence = null;
@@ -1117,7 +1117,7 @@ public class ProductPromoWorker {
// check the current recurrence
if (recurrence != null) {
if (recurrence.isValidCurrent()) {
compareBase = new Integer(0);
compareBase = Integer.valueOf(0);
}
}
}
@@ -1572,7 +1572,7 @@ public class ProductPromoWorker {
if (productPromoAction.getString("productPromoId").equals(checkOrderAdjustment.get("productPromoId")) &&
productPromoAction.getString("productPromoRuleId").equals(checkOrderAdjustment.get("productPromoRuleId")) &&
productPromoAction.getString("productPromoActionSeqId").equals(checkOrderAdjustment.get("productPromoActionSeqId"))) {
return new Integer(i);
return Integer.valueOf(i);
}
}
}
@@ -1621,7 +1621,7 @@ public class ProductPromoWorker {
if (productPromoAction.getString("productPromoId").equals(checkOrderAdjustment.get("productPromoId")) &&
productPromoAction.getString("productPromoRuleId").equals(checkOrderAdjustment.get("productPromoRuleId")) &&
productPromoAction.getString("productPromoActionSeqId").equals(checkOrderAdjustment.get("productPromoActionSeqId"))) {
return new Integer(i);
return Integer.valueOf(i);
}
}
return null;
@@ -136,7 +136,7 @@ public class ShoppingListEvents {
for (int i = 0; i < items.length; i++) {
Integer cartIdInt = null;
try {
cartIdInt = new Integer(items[i]);
cartIdInt = Integer.valueOf(items[i]);
} catch (Exception e) {
Debug.logWarning(e, UtilProperties.getMessage(resource_error,"OrderIllegalCharacterInSelectedItemField", cart.getLocale()), module);
}
@@ -99,7 +99,7 @@ public class TaxwareUTL {
// make the header file
Record header = outHead.makeRecord("outHead");
header.set("NUMBER_RECORDS", new Long(outItem.getRecords().size()));
header.set("NUMBER_RECORDS", Long.valueOf(outItem.getRecords().size()));
header.set("PROCESS_INDICATOR", "1");
outHead.addRecord(header);
@@ -166,9 +166,9 @@ public class TaxwareUTL {
else
record.set("COMMODITY_PRODUCT_CODE", "DEFAULT");
record.set("PART_NUMBER", product.get("productId"));
record.set("LINE_ITEM_AMOUNT", new Double(linePrice));
record.set("LINE_ITEM_AMOUNT", Double.valueOf(linePrice));
if (itemShipping > 0)
record.set("FREIGHT_AMOUNT", new Double(itemShipping));
record.set("FREIGHT_AMOUNT", Double.valueOf(itemShipping));
}
records.add(record);
}*/
@@ -973,7 +973,7 @@ public class PackingSession implements java.io.Serializable {
public BigDecimal getPackageWeight(int packageSeqId) {
if (this.packageWeights == null) return null;
BigDecimal packageWeight = null;
Object p = packageWeights.get(new Integer(packageSeqId));
Object p = packageWeights.get(Integer.valueOf(packageSeqId));
if (p != null) {
packageWeight = (BigDecimal) p;
}
@@ -823,7 +823,7 @@ public class WorkEffortServices {
} else {
newReminderDateTime = temporalExpression.next(cal).getTime();
}
reminder.set("currentCount", new Long(currentCount + 1));
reminder.set("currentCount", Long.valueOf(currentCount + 1));
reminder.set("reminderDateTime", new Timestamp(newReminderDateTime.getTime()));
reminder.store();
}
@@ -855,7 +855,7 @@ public class WorkEffortServices {
TimeDuration duration = TimeDuration.fromLong(repeatInterval);
duration.addToCalendar(cal);
reminderDateTime = cal.getTime();
reminder.set("currentCount", new Long(currentCount + 1));
reminder.set("currentCount", Long.valueOf(currentCount + 1));
reminder.set("reminderDateTime", new Timestamp(reminderDateTime.getTime()));
reminder.store();
}