Author: doogie
Date: Mon May 14 21:00:21 2012 New Revision: 1338405 URL: http://svn.apache.org/viewvc?rev=1338405&view=rev Log: DEPRECATION: applications/commonext: findByAnd variants replaced with findByAnd that takes a boolean useCache parameter. Modified: ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/FindFacility.groovy ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProdCatalog.groovy ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProductStoreAndWebSite.groovy Modified: ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/FindFacility.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/FindFacility.groovy?rev=1338405&r1=1338404&r2=1338405&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/FindFacility.groovy (original) +++ ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/FindFacility.groovy Mon May 14 21:00:21 2012 @@ -19,7 +19,7 @@ import org.ofbiz.base.util.* import org.ofbiz.entity.util.EntityUtil; -findResult = delegator.findByAnd("Facility", [ownerPartyId: partyId]); +findResult = delegator.findByAnd("Facility", [ownerPartyId: partyId], null, false); findResultSize = findResult.size(); if (findResultSize == 1) { context.showScreen = "one"; @@ -33,7 +33,7 @@ if ((findResultSize > 1 ) && (findResult context.showScreen = "more"; } -listPartyPostalAddress = delegator.findByAnd("PartyAndPostalAddress", [partyId: partyId]); +listPartyPostalAddress = delegator.findByAnd("PartyAndPostalAddress", [partyId: partyId], null, false); partyPostalAddress = EntityUtil.getFirst(EntityUtil.filterByDate(listPartyPostalAddress)); context.partyPostalAddress = partyPostalAddress; Modified: ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProdCatalog.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProdCatalog.groovy?rev=1338405&r1=1338404&r2=1338405&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProdCatalog.groovy (original) +++ ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProdCatalog.groovy Mon May 14 21:00:21 2012 @@ -26,7 +26,7 @@ showScreen = "origin"; List errMsgList = FastList.newInstance(); - productStore = EntityUtil.getFirst(delegator.findByAnd("ProductStore", [payToPartyId: partyId])); + productStore = EntityUtil.getFirst(delegator.findByAnd("ProductStore", [payToPartyId: partyId], null, false)); if(productStore){ context.productStoreId = productStore.productStoreId; } @@ -35,7 +35,7 @@ showScreen = "message"; }else{ facility = delegator.findOne("Facility", [facilityId : productStore.inventoryFacilityId], false); - webSite = EntityUtil.getFirst(delegator.findByAnd("WebSite", [productStoreId: productStore.productStoreId])); + webSite = EntityUtil.getFirst(delegator.findByAnd("WebSite", [productStoreId: productStore.productStoreId], null, false)); if(UtilValidate.isEmpty(facility)){ errMsgList.add("Facility not set!"); @@ -51,7 +51,7 @@ return; } - productStoreCatalog = EntityUtil.getFirst(delegator.findByAnd("ProductStoreCatalog", [productStoreId: productStore.productStoreId])); + productStoreCatalog = EntityUtil.getFirst(delegator.findByAnd("ProductStoreCatalog", [productStoreId: productStore.productStoreId], null, false)); if(productStoreCatalog){ prodCatalog = productStoreCatalog.getRelatedOne("ProdCatalog"); prodCatalogId = prodCatalog.prodCatalogId; @@ -70,9 +70,9 @@ showErrorMsg = "Y"; } - prodCatalogCategory = EntityUtil.getFirst(delegator.findByAnd("ProdCatalogCategory", [prodCatalogId: prodCatalogId, sequenceNum: new Long(1)])); + prodCatalogCategory = EntityUtil.getFirst(delegator.findByAnd("ProdCatalogCategory", [prodCatalogId: prodCatalogId, sequenceNum: new Long(1)], null, false)); if(prodCatalogCategory){ - productCategory = EntityUtil.getFirst(delegator.findByAnd("ProductCategory", [primaryParentCategoryId : prodCatalogCategory.productCategoryId])); + productCategory = EntityUtil.getFirst(delegator.findByAnd("ProductCategory", [primaryParentCategoryId : prodCatalogCategory.productCategoryId], null, false)); if(productCategory){ productCategoryId = productCategory.productCategoryId; } @@ -89,12 +89,12 @@ showErrorMsg = "Y"; } /**************** get product from ProductCategory ******************/ - productCategoryMember = EntityUtil.getFirst(delegator.findByAnd("ProductCategoryMember", [productCategoryId: productCategoryId])); + productCategoryMember = EntityUtil.getFirst(delegator.findByAnd("ProductCategoryMember", [productCategoryId: productCategoryId], null, false)); if(productCategoryMember){ product = productCategoryMember.getRelatedOne("Product"); productId = product.productId; // Average cost - averageCostValues = delegator.findByAnd("ProductPrice", [productId : productId, productPricePurposeId : "PURCHASE", productPriceTypeId : "AVERAGE_COST"]); + averageCostValues = delegator.findByAnd("ProductPrice", [productId : productId, productPricePurposeId : "PURCHASE", productPriceTypeId : "AVERAGE_COST"], null, false); if(averageCostValues){ averageCostValue = EntityUtil.getFirst(EntityUtil.filterByDate(averageCostValues)); if (averageCostValue?.price != null) { @@ -102,7 +102,7 @@ } } // Default cost - defaultPriceValues = delegator.findByAnd("ProductPrice", [productId : productId, productPricePurposeId : "PURCHASE", productPriceTypeId : "DEFAULT_PRICE"]); + defaultPriceValues = delegator.findByAnd("ProductPrice", [productId : productId, productPricePurposeId : "PURCHASE", productPriceTypeId : "DEFAULT_PRICE"], null, false); if(defaultPriceValues){ defaultPrice = EntityUtil.getFirst(EntityUtil.filterByDate(defaultPriceValues)); if (defaultPrice?.price != null) { Modified: ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProductStoreAndWebSite.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProductStoreAndWebSite.groovy?rev=1338405&r1=1338404&r2=1338405&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProductStoreAndWebSite.groovy (original) +++ ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/actions/GetProductStoreAndWebSite.groovy Mon May 14 21:00:21 2012 @@ -23,7 +23,7 @@ productStoreId = null; -productStore = EntityUtil.getFirst(delegator.findByAnd("ProductStore", [payToPartyId: partyId])); +productStore = EntityUtil.getFirst(delegator.findByAnd("ProductStore", [payToPartyId: partyId], null, false)); if(productStore){ productStoreId = productStore.productStoreId } @@ -32,7 +32,7 @@ context.productStore = productStore; if("website".equals(tabButtonItemTop)){ if(productStoreId != null){ - webSite = EntityUtil.getFirst(delegator.findByAnd("WebSite", [productStoreId: productStoreId])); + webSite = EntityUtil.getFirst(delegator.findByAnd("WebSite", [productStoreId: productStoreId], null, false)); context.showScreen = "origin"; }else{ request.setAttribute("_ERROR_MESSAGE_", "Product Store not set!"); |
Free forum by Nabble | Edit this page |