Author: jonesde
Date: Tue Feb 13 00:38:27 2007 New Revision: 506910 URL: http://svn.apache.org/viewvc?view=rev&rev=506910 Log: Fixed compile error, there was some broken code because of CategoryWorker changes Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java?view=diff&rev=506910&r1=506909&r2=506910 ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java Tue Feb 13 00:38:27 2007 @@ -30,6 +30,8 @@ import java.util.Set; import java.util.TreeSet; +import javolution.util.FastList; + import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilMisc; @@ -510,15 +512,15 @@ public static class CatalogConstraint extends ProductSearchConstraint { public static final String constraintName = "Catalog"; protected String prodCatalogId; - protected ArrayList productCategories; + protected List productCategories; - public CatalogConstraint(String prodCatalogId, ArrayList productCategories) { + public CatalogConstraint(String prodCatalogId, List productCategories) { this.prodCatalogId = prodCatalogId; this.productCategories = productCategories; } public void addConstraint(ProductSearchContext productSearchContext) { - ArrayList productCategoryIds = new ArrayList(); + List productCategoryIds = FastList.newInstance(); Iterator itCat = productCategories.iterator(); while (itCat.hasNext()) { GenericValue category = (GenericValue)itCat.next(); @@ -594,7 +596,8 @@ // find all sub-categories recursively, make a Set of productCategoryId Set productCategoryIdSet = new HashSet(); ProductSearch.getAllSubCategoryIds(productCategoryId, productCategoryIdSet, productSearchContext.getDelegator(), productSearchContext.nowTimestamp); - productCategoryIdList = new ArrayList(productCategoryIdSet); + productCategoryIdList = FastList.newInstance(); + productCategoryIdList.addAll(productCategoryIdSet); } else { productCategoryIdList = UtilMisc.toList(productCategoryId); } Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java?view=diff&rev=506910&r1=506909&r2=506910 ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java Tue Feb 13 00:38:27 2007 @@ -447,7 +447,7 @@ String searchCatalogId = (String) parameters.get("SEARCH_CATALOG_ID"); if (searchCatalogId != null && !searchCatalogId.equalsIgnoreCase("")) { - ArrayList categories = CategoryWorker.getRelatedCategoriesRet(request, "topLevelList", CatalogWorker.getCatalogTopCategoryId(request, searchCatalogId), true); + List categories = CategoryWorker.getRelatedCategoriesRet(request, "topLevelList", CatalogWorker.getCatalogTopCategoryId(request, searchCatalogId), true); searchAddConstraint(new ProductSearch.CatalogConstraint(searchCatalogId, categories), session); constraintsChanged = true; } |
Free forum by Nabble | Edit this page |