svn commit: r959943 - /ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java

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

svn commit: r959943 - /ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java

jleroux@apache.org
Author: jleroux
Date: Fri Jul  2 10:32:58 2010
New Revision: 959943

URL: http://svn.apache.org/viewvc?rev=959943&view=rev
Log:
Revert r959673 on Scott's advice. There is already a getCategoryMembers. A bit different but it's ok, as it does not make much sense to sort categoryMembers with another field than sequenceNum

Modified:
    ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java?rev=959943&r1=959942&r2=959943&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonWorkers.java Fri Jul  2 10:32:58 2010
@@ -33,7 +33,6 @@ import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.condition.EntityCondition;
 import org.ofbiz.entity.condition.EntityExpr;
 import org.ofbiz.entity.condition.EntityOperator;
-import org.ofbiz.entity.util.EntityUtil;
 
 /**
  * Common Workers
@@ -136,35 +135,6 @@ public class CommonWorkers {
         return geoList;
     }
 
-    public static List<GenericValue> getAssociatedProductsList(Delegator delegator, String productCategoryId) {
-        return getAssociatedProductsList(delegator, productCategoryId, null);
-    }
-
-    /**
-     * Returns a list of active related products for a product category
-     */
-    public static List<GenericValue> getAssociatedProductsList(Delegator delegator, String productCategoryId, String listOrderBy) {
-        List<GenericValue> products = FastList.newInstance();
-        if (UtilValidate.isNotEmpty(productCategoryId)) {
-            EntityCondition productsFindCond = EntityCondition.makeCondition(
-                    EntityCondition.makeCondition("productCategoryId", productCategoryId));
-    
-            if (UtilValidate.isEmpty(listOrderBy)) {
-                listOrderBy = "sequenceNum";
-            }
-            List<String> sortList = UtilMisc.toList(listOrderBy);
-    
-            try {
-                products = delegator.findList("ProductCategoryMember", productsFindCond, null, sortList, null, true);
-                products = EntityUtil.filterByDate(products);
-            } catch (GenericEntityException e) {
-                Debug.logError(e, "Cannot lookup ProductCategoryMember", module);
-            }
-        }
-
-        return products;
-    }
-
     /**
      * A generic method to be used on Type enities, e.g. ProductType.  Recurse to the root level in the type hierarchy
      * and checks if the specified type childType has parentType as its parent somewhere in the hierarchy.