svn commit: r576012 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r576012 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java

lektran
Author: lektran
Date: Sat Sep 15 17:42:40 2007
New Revision: 576012

URL: http://svn.apache.org/viewvc?rev=576012&view=rev
Log:
Removed deprecated getItemWeight() and renamed getItemWeightBd()

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=576012&r1=576011&r2=576012&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Sat Sep 15 17:42:40 2007
@@ -981,14 +981,14 @@
             Iterator i = validItems.iterator();
             while (i.hasNext()) {
                 GenericValue item = (GenericValue) i.next();
-                shippableWeight = shippableWeight.add(this.getItemWeightBd(item).multiply( getOrderItemQuantityBd(item))).setScale(scale, rounding);
+                shippableWeight = shippableWeight.add(this.getItemWeight(item).multiply( getOrderItemQuantityBd(item))).setScale(scale, rounding);
             }
         }
 
         return shippableWeight.setScale(scale, rounding);
     }
 
-    public BigDecimal getItemWeightBd(GenericValue item) {
+    public BigDecimal getItemWeight(GenericValue item) {
         GenericDelegator delegator = orderHeader.getDelegator();
         BigDecimal itemWeight = ZERO;
 
@@ -1027,11 +1027,6 @@
         return itemWeight;
     }
 
-    /** @deprecated Use getItemWeightBd() instead */
-    public double getItemWeight(GenericValue item) {
-        return getItemWeightBd(item).doubleValue();
-    }
-
     public List getShippableSizes() {
         List shippableSizes = FastList.newInstance();
 
@@ -1228,7 +1223,7 @@
         Map itemInfo = FastMap.newInstance();
         itemInfo.put("productId", item.getString("productId"));
         itemInfo.put("quantity", getOrderItemQuantity(item));
-        itemInfo.put("weight", new Double(this.getItemWeight(item)));
+        itemInfo.put("weight", new Double(this.getItemWeight(item).doubleValue()));
         itemInfo.put("size",  new Double(this.getItemSize(item)));
         itemInfo.put("piecesIncluded", new Long(this.getItemPiecesIncluded(item)));
         itemInfo.put("featureSet", this.getItemFeatureSet(item));