Author: doogie
Date: Mon May 14 21:02:53 2012 New Revision: 1338416 URL: http://svn.apache.org/viewvc?rev=1338416&view=rev Log: DEPRECATION: specialpurpose/googlebase: findByAnd variants replaced with findByAnd that takes a boolean useCache parameter. Modified: ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/ProductsExportToGoogle.java ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/FilterProducts.groovy ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/googlebaseDivideList.groovy ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/productsExportToGoogle.groovy ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/productsToGooglebase.groovy Modified: ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/ProductsExportToGoogle.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/ProductsExportToGoogle.java?rev=1338416&r1=1338415&r2=1338416&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/ProductsExportToGoogle.java (original) +++ ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/ProductsExportToGoogle.java Mon May 14 21:02:53 2012 @@ -432,7 +432,7 @@ public class ProductsExportToGoogle { String productName = null; String productDescription = null; //String productURL = null; - List<GenericValue> productAndInfos = delegator.findByAnd("ProductContentAndInfo", UtilMisc.toMap("productId", prod.getString("productId"), "localeString", localeString, "thruDate", null)); + List<GenericValue> productAndInfos = delegator.findByAnd("ProductContentAndInfo", UtilMisc.toMap("productId", prod.getString("productId"), "localeString", localeString, "thruDate", null), null, false); if (productAndInfos.size() > 0) { for (GenericValue productContentAndInfo : productAndInfos ) { String dataReSourceId = productContentAndInfo.getString("dataResourceId"); @@ -757,7 +757,7 @@ public class ProductsExportToGoogle { } //Add quantity item - List<GenericValue> inventoryItems = delegator.findByAnd("InventoryItem", UtilMisc.toMap("productId", product.getString("productId"))); + List<GenericValue> inventoryItems = delegator.findByAnd("InventoryItem", UtilMisc.toMap("productId", product.getString("productId")), null, false); if (UtilValidate.isNotEmpty(inventoryItems)) { BigDecimal totalquantity = new BigDecimal(0); for (GenericValue inventoryItem : inventoryItems) { @@ -779,7 +779,7 @@ public class ProductsExportToGoogle { String shippingWeight = product.getString("weight") + " " + uom.getString("description"); UtilXml.addChildElementNSValue(entryElem, "g:shipping_weight", shippingWeight, feedDocument, googleBaseNSUrl); } - List<GenericValue> productFeatureAndAppls = delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId", product.getString("productId"))); + List<GenericValue> productFeatureAndAppls = delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId", product.getString("productId")), null, false); if (productFeatureAndAppls.size() > 0) { for (GenericValue productFeatureAndAppl : productFeatureAndAppls) { //Add Genre Modified: ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/FilterProducts.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/FilterProducts.groovy?rev=1338416&r1=1338415&r2=1338416&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/FilterProducts.groovy (original) +++ ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/FilterProducts.groovy Mon May 14 21:02:53 2012 @@ -27,7 +27,7 @@ import javax.servlet.http.HttpSession; defaultLocaleString = ""; if (parameters.productStoreId) { - productStore = delegator.findByAnd("ProductStore", ["productStoreId":parameters.productStoreId]); + productStore = delegator.findByAnd("ProductStore", ["productStoreId":parameters.productStoreId], null, false); defaultLocaleString = productStore[0].defaultLocaleString.toString() } active = parameters.ACTIVE_PRODUCT; @@ -37,7 +37,7 @@ productList = FastList.newInstance(); if (UtilValidate.isNotEmpty(productIds) && ("Y".equals(active) || "Y".equals(notSynced))) { for (int i = 0; i < productIds.size(); i++) { productId = productIds[i]; - productCategoryMembers = delegator.findByAnd("ProductCategoryMember", [productId : productId]); + productCategoryMembers = delegator.findByAnd("ProductCategoryMember", [productId : productId], null, false); productCategoryMember = EntityUtil.getFirst(productCategoryMembers); if (UtilValidate.isNotEmpty(productCategoryMember)) { if ("Y".equals(active) && "Y".equals(notSynced)) { Modified: ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/googlebaseDivideList.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/googlebaseDivideList.groovy?rev=1338416&r1=1338415&r2=1338416&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/googlebaseDivideList.groovy (original) +++ ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/googlebaseDivideList.groovy Mon May 14 21:02:53 2012 @@ -4,7 +4,7 @@ import javolution.util.FastList; //productList.unique() like distinct sql command, return string type. def productUniqueStr = productList.unique(); def productUniqueStrList = productUniqueStr.toList(); -def googleBaseList = delegator.findByAnd("GoodIdentification",["goodIdentificationTypeId":"GOOGLE_ID_" + productStore.defaultLocaleString]); +def googleBaseList = delegator.findByAnd("GoodIdentification",["goodIdentificationTypeId":"GOOGLE_ID_" + productStore.defaultLocaleString], null, false); //find product is existed in google base. def notNeededList = productUniqueStrList - googleBaseList.productId; def resultList = productUniqueStrList - notNeededList; Modified: ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/productsExportToGoogle.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/productsExportToGoogle.groovy?rev=1338416&r1=1338415&r2=1338416&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/productsExportToGoogle.groovy (original) +++ ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/productsExportToGoogle.groovy Mon May 14 21:02:53 2012 @@ -43,7 +43,7 @@ if (parameters.productStoreId) { } if (parameters.productStoreId) { - productStore = delegator.findByAnd("ProductStore", ["productStoreId":parameters.productStoreId]); + productStore = delegator.findByAnd("ProductStore", ["productStoreId":parameters.productStoreId], null, false); str = productStore[0].defaultLocaleString.toString().toUpperCase(); localeString = str.substring(str.length()-2, str.length()); if(localeString.equals("US")){ Modified: ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/productsToGooglebase.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/productsToGooglebase.groovy?rev=1338416&r1=1338415&r2=1338416&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/productsToGooglebase.groovy (original) +++ ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/productsToGooglebase.groovy Mon May 14 21:02:53 2012 @@ -33,7 +33,7 @@ categoryIdsTemp = [] if (parameters.productStoreId) { productStoreId = parameters.productStoreId; } -googleBaseConfigList = delegator.findByAnd("GoogleBaseConfig",["productStoreId":productStoreId]); +googleBaseConfigList = delegator.findByAnd("GoogleBaseConfig",["productStoreId":productStoreId], null, false); if (productStoreId) { productStoreCatalogs = CatalogWorker.getStoreCatalogs(delegator, productStoreId); if (productStoreCatalogs) { @@ -46,7 +46,7 @@ if (productStoreId) { currentCatalogId = null; prodCatalogList.each { prodCatalogList -> currentCatalogId = prodCatalogList.prodCatalogId - prodCatalogCategoryList = delegator.findByAnd("ProdCatalogCategory",["prodCatalogId":currentCatalogId, "prodCatalogCategoryTypeId":"PCCT_BROWSE_ROOT"]); + prodCatalogCategoryList = delegator.findByAnd("ProdCatalogCategory",["prodCatalogId":currentCatalogId, "prodCatalogCategoryTypeId":"PCCT_BROWSE_ROOT"], null, false); topCategory = prodCatalogCategoryList.productCategoryId[0]; if (topCategory){ relatedCategories = dispatcher.runSync("getRelatedCategories", [parentProductCategoryId: topCategory, userLogin: userLogin]); |
Free forum by Nabble | Edit this page |