svn commit: r1647937 [1/5] - in /ofbiz/trunk: applications/product/webapp/catalog/WEB-INF/actions/ applications/product/webapp/catalog/WEB-INF/actions/category/ applications/product/webapp/catalog/WEB-INF/actions/config/ applications/product/webapp/cat...

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

svn commit: r1647937 [1/5] - in /ofbiz/trunk: applications/product/webapp/catalog/WEB-INF/actions/ applications/product/webapp/catalog/WEB-INF/actions/category/ applications/product/webapp/catalog/WEB-INF/actions/config/ applications/product/webapp/cat...

ashish-18
Author: ashish
Date: Fri Dec 26 06:54:50 2014
New Revision: 1647937

URL: http://svn.apache.org/r1647937
Log:
Applied two patch files from jira issue - OFBIZ-5893 - Use EntityQuery Builder methods in goovy files by replacing Entity Engine methods. Thanks Arun for your recent contribution where you have included changes from specialpurpose and product component.

Modified:
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/FastLoadCache.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CreateProductInCategoryCheckExisting.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategory.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryContentContent.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategorySEO.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContentContent.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureGroups.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/QuickAddProductFeatures.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/keywordsearch.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/sidecatalogs.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/sidedeepcategory.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageGallery.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageRecentlyApproved.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageUpload.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/seoLocales.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/sortSequenceNum.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/lookup/LookupVariantProduct.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules_old.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromCategory.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromGroup.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductAssoc.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContentContent.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductFeatures.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductQuickAdmin.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductSEO.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/promo/EditProductPromoCode.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/store/EditProductStorePaySetup.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/store/EditProductStoreSurveys.groovy
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/thesaurus/EditKeywordThesaurus.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/CountFacilityInventoryByProduct.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditContactMech.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacility.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacilityLocation.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/FacilityLocationGeoLocation.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/FindFacility.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/FindFacilityLocation.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/FindFacilityTransfers.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/FindInventoryItemsByLabels.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewContactMechs.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/FindFacilityPhysicalInventory.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryAverageCosts.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemTotals.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/LookupInventoryItems.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/PhysicalInventoryVariance.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/TransferInventoryItem.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/returns/ReceiveReturn.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromInventory.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromOrder.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipment.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentItems.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPackages.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPlan.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentRouteSegments.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackingSlip.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PrintPickSheets.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/QuickShipOrder.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ReviewOrdersNotPickedOrPacked.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ShipmentManifest.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/VerifyPick.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ViewShipment.groovy
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/WeightPackage.groovy
    ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/actions/assetmaint/EditMaint.groovy
    ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/actions/assetmaint/PrintFixedAssetMaint.groovy
    ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/actions/workeffort/EditWorkEfforts.groovy
    ofbiz/trunk/specialpurpose/bi/webapp/bi/WEB-INF/actions/reportbuilder/RunStarSchemaQuery.groovy
    ofbiz/trunk/specialpurpose/ebay/webapp/ebay/WEB-INF/actions/find/EbayAdvancedSearch.groovy
    ofbiz/trunk/specialpurpose/ebay/webapp/ebay/WEB-INF/actions/find/ProductsExportToEbay.groovy
    ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/automationPreferences/GetEbayJobsandbox.groovy
    ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/email/GetProductStoreEmailTemplate.groovy
    ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/feedback/FeedbackList.groovy
    ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/CheckOrderStatus.groovy
    ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/OrderListPrepare.groovy
    ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/PrepareProductListing.groovy
    ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/StoreAccount.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/LayeredNavigation.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/MiniProductSummary.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/PopularTags.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ProductCategories.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ajaxbreadcrumbs.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/content/Mrv.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/content/Search.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ContactList.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/CustomerReviews.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/CustomerSurvey.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditContactMech.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditEmailAndTelecomNumber.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ViewProfile.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ContentAddPrep.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ContentPrep.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/CurrentValPrep.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/EditAddPrep.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/PermPrep.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/RespondPermAndPrep.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ResponsePrep.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/BillSettings.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CheckoutReview.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CustSettings.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OptionSettings.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderHistory.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderStatus.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/PaymentInformation.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/QuickAnonCustSettings.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/QuickAnonOptionSettings.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/RequestReturn.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipSettings.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipmentStatus.groovy
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy
    ofbiz/trunk/specialpurpose/example/webapp/example/WEB-INF/actions/includes/FindExampleFeatures.groovy
    ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/FilterProducts.groovy
    ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/GoogleBaseAdvancedSearch.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
    ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy
    ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy
    ofbiz/trunk/specialpurpose/lucene/webapp/content/WEB-INF/actions/IndexProducts.groovy
    ofbiz/trunk/specialpurpose/lucene/webapp/content/WEB-INF/actions/Search.groovy
    ofbiz/trunk/specialpurpose/lucene/webapp/content/WEB-INF/actions/SearchProducts.groovy
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListCurrentProjects.groovy
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListResourceBillingHours.groovy
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ProjectBilling.groovy
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ProjectIsBillable.groovy
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/getLastRequestAssignment.groovy
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/getProjectId.groovy
    ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/AddProductBacklogItem.groovy
    ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/AddResourceTaskParty.groovy
    ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/BacklogNotifications.groovy
    ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/EditDailyHourReport.groovy
    ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/EditWeekTimesheet.groovy
    ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/FindBacklogItem.groovy
    ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/FindProductBacklogItem.groovy
    ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/FindTaskList.groovy
    ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListCurrentProducts.groovy
    ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListCurrentSprints.groovy
    ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListRevision.groovy
    ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListScrumPreferenceSecurityGroup.groovy
    ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListScrumRolesPersonAndCompany.groovy
    ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListTimeSheets.groovy
    ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ListUnplanBacklog.groovy
    ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ProductBilling.groovy
    ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/ProductEmail.groovy
    ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/QuickAddBacklog.groovy
    ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/SprintBacklogListItems.groovy
    ofbiz/trunk/specialpurpose/scrum/webapp/scrum/WEB-INF/actions/TaskList.groovy
    ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/Login.groovy
    ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy
    ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/catalog/Category.groovy
    ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/customer/EditAddress.groovy
    ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/manager/PaidOutAndIn.groovy
    ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/search/CustomerAddress.groovy
    ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/search/SearchSalesReps.groovy

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/FastLoadCache.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/FastLoadCache.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/FastLoadCache.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/FastLoadCache.groovy Fri Dec 26 06:54:50 2014
@@ -26,7 +26,7 @@ messageList = [];
 messageList.add("Loading Categories...");
 UtilTimer ctimer = new UtilTimer();
 messageList.add(ctimer.timerString("Before category find"));
-categories = delegator.find("ProductCategory", null, null, null, null, null);
+categories = from("ProductCategory").queryIterator();
 messageList.add(ctimer.timerString("Before load all categories into cache"));
 
 category = null;
@@ -45,7 +45,7 @@ messageList.add(" ");
 messageList.add("Loading Products...");
 UtilTimer ptimer = new UtilTimer();
 messageList.add(ptimer.timerString("Before product find"));
-products = delegator.find("Product", null, null, null, null, null);
+products = from("Product").queryIterator();
 messageList.add(ptimer.timerString("Before load all products into cache"));
 product = null;
 long numProducts = 0;

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy Fri Dec 26 06:54:50 2014
@@ -47,7 +47,7 @@ List separateRootType(roots) {
 
 completedTree =  [];
 // Get the Catalogs
-prodCatalogs = delegator.findList("ProdCatalog", null, null, null, null, false);
+prodCatalogs = from("ProdCatalog").queryList();
 if (prodCatalogs) {
     prodCatalogs.each { prodCatalog ->
         prodCatalogMap = [:];
@@ -55,7 +55,7 @@ if (prodCatalogs) {
         prodCatalogMap.categoryName = prodCatalog.getString("catalogName");
         prodCatalogMap.isCatalog = true;
         prodCatalogMap.isCategoryType = false;
-        prodCatalogCategories = EntityUtil.filterByDate(delegator.findByAnd("ProdCatalogCategory", ["prodCatalogId" : prodCatalog.prodCatalogId], null, false));
+        prodCatalogCategories = from("ProdCatalogCategory").where("prodCatalogId", prodCatalog.prodCatalogId).filterByDate().queryList();
         if (prodCatalogCategories) {
             prodCatalogMap.child = separateRootType(prodCatalogCategories);
         }

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CreateProductInCategoryCheckExisting.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CreateProductInCategoryCheckExisting.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CreateProductInCategoryCheckExisting.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CreateProductInCategoryCheckExisting.groovy Fri Dec 26 06:54:50 2014
@@ -36,14 +36,14 @@ productIds = ProductSearch.parametricKey
 // get the product for each ID
 products = new ArrayList(productIds.size());
 productIds.each { productId ->
-    product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), true);
+    product = from("Product").where("productId", productId).cache(true).queryOne();
     products.add(product);
 }
 
 productFeatureAndTypeDatas = new ArrayList(featureIdByType.size());
 featureIdByType.each { featureIdByTypeEntry ->
-    productFeatureType = delegator.findOne("ProductFeatureType", UtilMisc.toMap("productFeatureTypeId", featureIdByTypeEntry.key), true);
-    productFeature = delegator.findOne("ProductFeature", UtilMisc.toMap("productFeatureId", featureIdByTypeEntry.value), true);
+    productFeatureType = from("ProductFeatureType").where("productFeatureTypeId", featureIdByTypeEntry.key).cache(true).queryOne();
+    productFeature = from("ProductFeature").where("productFeatureId", featureIdByTypeEntry.value).cache(true).queryOne();
     productFeatureAndTypeData = [:];
     productFeatureAndTypeData.productFeatureType = productFeatureType;
     productFeatureAndTypeData.productFeature = productFeature;

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategory.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategory.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategory.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategory.groovy Fri Dec 26 06:54:50 2014
@@ -30,7 +30,7 @@ primParentCatIdParam = request.getParame
 if (productCategory) {
     primaryParentCategory = productCategory.getRelatedOne("PrimaryParentProductCategory", false);
 } else if (primParentCatIdParam) {
-    primaryParentCategory = delegator.findOne("ProductCategory", [productCategoryId : primParentCatIdParam], false);
+    primaryParentCategory = from("ProductCategory").where("productCategoryId", primParentCatIdParam).queryOne();
 }
 context.primaryParentCategory = primaryParentCategory;
 

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryContentContent.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryContentContent.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryContentContent.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryContentContent.groovy Fri Dec 26 06:54:50 2014
@@ -38,7 +38,7 @@ if (("PAGE_TITLE".equals(prodCatContentT
     context.contentFormTitle = "${uiLabelMap.ProductUpdateSEOContentCategory}";
 }
 if ("RELATED_URL".equals(prodCatContentTypeId)) {
-    contentList = delegator.findByAnd("ContentDataResourceView", UtilMisc.toMap("contentId", contentId), null, false);
+    contentList = from("ContentDataResourceView").where("contentId", contentId).queryList();
     if (contentList) {
         context.contentId = contentList.get(0).contentId;
         context.dataResourceId = contentList.get(0).dataResourceId;

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategorySEO.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategorySEO.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategorySEO.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategorySEO.groovy Fri Dec 26 06:54:50 2014
@@ -19,21 +19,21 @@
 
 productCategoryId = parameters.productCategoryId;
 if (productCategoryId) {
-    productCategoryContents  = delegator.findByAnd("ProductCategoryContent", ["productCategoryId" : productCategoryId], null, false);
+    productCategoryContents  = from("ProductCategoryContent").where("productCategoryId", productCategoryId).queryList();
     productCategoryContents.each{ productCategoryContent->
         if (productCategoryContent.prodCatContentTypeId == "PAGE_TITLE") {
-            contentTitle  = delegator.findOne("Content", ["contentId" : productCategoryContent.contentId], false);
-            dataTextTitle  = delegator.findOne("ElectronicText", ["dataResourceId" : contentTitle.dataResourceId], false);
+            contentTitle  = from("Content").where("contentId", productCategoryContent.contentId).queryOne();
+            dataTextTitle  = from("ElectronicText").where("dataResourceId", contentTitle.dataResourceId).queryOne();
             context.title = dataTextTitle.textData;
         }
         if (productCategoryContent.prodCatContentTypeId == "META_KEYWORD") {
-            contentMetaKeyword  = delegator.findOne("Content", ["contentId" : productCategoryContent.contentId], false);
-            dataTextMetaKeyword  = delegator.findOne("ElectronicText", ["dataResourceId" : contentMetaKeyword.dataResourceId], false);
+            contentMetaKeyword  = from("Content").where("contentId", productCategoryContent.contentId).queryOne();
+            dataTextMetaKeyword  = from("ElectronicText").where("dataResourceId", contentMetaKeyword.dataResourceId).queryOne();
             context.metaKeyword = dataTextMetaKeyword.textData;
         }
         if (productCategoryContent.prodCatContentTypeId == "META_DESCRIPTION") {
-            contentMetaDescription  = delegator.findOne("Content", ["contentId" : productCategoryContent.contentId], false);
-            dataTextMetaDescription  = delegator.findOne("ElectronicText", ["dataResourceId" : contentMetaDescription.dataResourceId], false);
+            contentMetaDescription  = from("Content").where("contentId", productCategoryContent.contentId).queryOne();
+            dataTextMetaDescription  = from("ElectronicText").where("dataResourceId", contentMetaDescription.dataResourceId).queryOne();
             context.metaDescription = dataTextMetaDescription.textData;
         }
     }

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContentContent.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContentContent.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContentContent.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContentContent.groovy Fri Dec 26 06:54:50 2014
@@ -28,7 +28,7 @@ confItemContentTypeId = request.getParam
 
 description = request.getParameter("description") ?: null;
 
-productContent = delegator.findOne("ProdConfItemContent", [contentId : contentId, configItemId : configItemId, confItemContentTypeId : confItemContentTypeId, fromDate : fromDate], false);
+productContent = from("ProdConfItemContent").where("contentId", contentId, "configItemId", configItemId, "confItemContentTypeId", confItemContentTypeId, "fromDate", fromDate).queryOne();
 if (!productContent) {
     productContent = [:];
     productContent.configItemId = configItemId;
@@ -45,7 +45,7 @@ Map content = null;
 
 context.contentId = contentId;
 if (contentId) {
-    content = delegator.findOne("Content", [contentId : contentId], false);
+    content = from("Content").where("contentId", contentId).queryOne();
     context.content = content;
 } else {
     content = [:];

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.groovy Fri Dec 26 06:54:50 2014
@@ -35,18 +35,18 @@ context.productId = productId;
 productFeatureCategoryId = parameters.get("productFeatureCategoryId");
 context.productFeatureCategoryId = productFeatureCategoryId;
 
-context.curProductFeatureCategory = delegator.findOne("ProductFeatureCategory", [productFeatureCategoryId : productFeatureCategoryId], false);
+context.curProductFeatureCategory = from("ProductFeatureCategory").where("productFeatureCategoryId", productFeatureCategoryId).queryOne();
 
-context.productFeatureTypes = delegator.findList("ProductFeatureType", null, null, ['description'], null, false);
+context.productFeatureTypes = from("ProductFeatureType").orderBy("description").queryList();
 
-context.productFeatureCategories = delegator.findList("ProductFeatureCategory", null, null, ['description'], null, false);
+context.productFeatureCategories = from("ProductFeatureCategory").orderBy("description").queryList();
 
 //we only need these if we will be showing the apply feature to category forms
 if (productId) {
-    context.productFeatureApplTypes = delegator.findList("ProductFeatureApplType", null, null, ['description'], null, false);
+    context.productFeatureApplTypes = from("ProductFeatureApplType").orderBy("description").queryList();
 }
 
-productFeaturesSize = delegator.findCountByCondition("ProductFeature", EntityCondition.makeCondition("productFeatureCategoryId", EntityOperator.EQUALS, productFeatureCategoryId), null, null);
+productFeaturesSize = from("ProductFeature").where("productFeatureCategoryId", productFeatureCategoryId).queryCount();
 
 highIndex = 0;
 lowIndex = 0;
@@ -66,17 +66,17 @@ context.listSize = listSize;
 context.lowIndex = lowIndex;
 context.highIndex = highIndex;
 
-whereCondition = EntityCondition.makeCondition([productFeatureCategoryId : productFeatureCategoryId], EntityOperator.AND);
-EntityFindOptions efo = new EntityFindOptions();
-efo.setDistinct(true);
-efo.setResultSetType(EntityFindOptions.TYPE_SCROLL_INSENSITIVE);
-efo.setMaxRows(highIndex);
-
 boolean beganTransaction = false;
 try {
     beganTransaction = TransactionUtil.begin();
 
-    productFeaturesEli = delegator.find("ProductFeature", whereCondition, null, null, ['productFeatureTypeId', 'defaultSequenceNum', 'description'], efo);
+    productFeaturesEli = from("ProductFeature")
+                            .where("productFeatureCategoryId", productFeatureCategoryId)
+                            .orderBy("productFeatureTypeId", "defaultSequenceNum", "description")
+                            .distinct()
+                            .cursorScrollInsensitive()
+                            .maxRows(highIndex)
+                            .queryIterator();
     productFeatures = productFeaturesEli.getPartialList(lowIndex + 1, highIndex - lowIndex);
     productFeaturesEli.close();
 } catch (GenericEntityException e) {
@@ -103,7 +103,7 @@ productFeatureIter = productFeatures.ite
 productFeatureApplIter = null;
 while (productFeatureIter) {
     productFeature = productFeatureIter.next();
-    productFeatureAppls = delegator.findList("ProductFeatureAppl", EntityCondition.makeCondition([productId : productId, productFeatureId : productFeature.productFeatureId]), null, null, null, false);
+    productFeatureAppls = from("ProductFeatureAppl").where("productId", productId, "productFeatureId", productFeature.productFeatureId).queryList();
     productFeatureApplIter = productFeatureAppls.iterator();
     while (productFeatureApplIter) {
         productFeatureAppl = productFeatureApplIter.next();

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureGroups.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureGroups.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureGroups.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureGroups.groovy Fri Dec 26 06:54:50 2014
@@ -19,4 +19,4 @@
 
 context.hasPermission = security.hasEntityPermission("CATALOG", "_VIEW", session)
 
-context.productFeatureGroups = delegator.findList("ProductFeatureGroup", null, null, null, null, false);
+context.productFeatureGroups = from("ProductFeatureGroup").queryList();

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/QuickAddProductFeatures.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/QuickAddProductFeatures.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/QuickAddProductFeatures.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/QuickAddProductFeatures.groovy Fri Dec 26 06:54:50 2014
@@ -17,6 +17,6 @@
  * under the License.
  */
 
-context.productFeatureTypes = delegator.findList("ProductFeatureType", null, null, ['description'], null, true);
+context.productFeatureTypes = from("ProductFeatureType").orderBy("description").cache(true).queryList();
 
-context.featureCategory = delegator.findOne("ProductFeatureCategory", [productFeatureCategoryId : parameters.productFeatureCategoryId], false);
+context.featureCategory = from("ProductFeatureCategory").where("productFeatureCategoryId", parameters.productFeatureCategoryId).queryOne();

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.groovy Fri Dec 26 06:54:50 2014
@@ -28,7 +28,7 @@ if ((!searchCategoryId || searchCategory
     currentCatalogId = CatalogWorker.getCurrentCatalogId(request);
     searchCategoryId = CatalogWorker.getCatalogSearchCategoryId(request, currentCatalogId);
 }
-searchCategory = delegator.findOne("ProductCategory", [productCategoryId : searchCategoryId], false);
+searchCategory = from("ProductCategory").where("productCategoryId", searchCategoryId).queryOne();
 
 if (searchCategoryId) {
     productFeaturesByTypeMap = ParametricSearch.makeCategoryFeatureLists(searchCategoryId, delegator, 2000);
@@ -46,10 +46,10 @@ searchConstraintStrings = ProductSearchS
 searchSortOrderString = ProductSearchSession.searchGetSortOrderString(false, request);
 
 // get suppliers in system
-supplerPartyRoleAndPartyDetails = delegator.findList("PartyRoleAndPartyDetail", EntityCondition.makeCondition([roleTypeId : 'SUPPLIER']), null, ['groupName', 'firstName'], null, false);
+supplerPartyRoleAndPartyDetails = from("PartyRoleAndPartyDetail").where(roleTypeId : "SUPPLIER").orderBy("groupName", "firstName").queryList();
 
 // get the GoodIdentification types
-goodIdentificationTypes = delegator.findList("GoodIdentificationType", null, null, ['description'], null, false);
+goodIdentificationTypes = from("GoodIdentificationType").orderBy("description").queryList();
 
 context.searchCategoryId = searchCategoryId;
 context.searchCategory = searchCategory;

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/keywordsearch.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/keywordsearch.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/keywordsearch.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/keywordsearch.groovy Fri Dec 26 06:54:50 2014
@@ -28,12 +28,12 @@ ProductSearchSession.processSearchParame
 prodCatalogId = CatalogWorker.getCurrentCatalogId(request);
 result = ProductSearchSession.getProductSearchResult(request, delegator, prodCatalogId);
 
-applicationTypes = delegator.findList("ProductFeatureApplType", null, null, ['description'], null, false);
+applicationTypes = from("ProductFeatureApplType").orderBy("description").queryList();
 
 expr = EntityCondition.makeCondition(EntityCondition.makeCondition("showInSelect", EntityOperator.EQUALS, null),
                                      EntityOperator.OR,
                                      EntityCondition.makeCondition("showInSelect", EntityOperator.NOT_EQUAL, "N"));
-productCategories = delegator.findList("ProductCategory", expr, null, ['description'], null, false);
+productCategories = from("ProductCategory").where(expr).orderBy("description").queryList();
 
 context.applicationTypes = applicationTypes;
 context.productCategories = productCategories;

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/sidecatalogs.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/sidecatalogs.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/sidecatalogs.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/sidecatalogs.groovy Fri Dec 26 06:54:50 2014
@@ -32,7 +32,7 @@ context.isOpen = isOpen;
 
 //prodCatalogs
 if (isOpen) {
-    prodCatalogs = delegator.findList("ProdCatalog", null, null, null, null, false);
+    prodCatalogs = from("ProdCatalog").queryList();
     context.prodCatalogs = prodCatalogs;
 }
 

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/sidedeepcategory.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/sidedeepcategory.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/sidedeepcategory.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/sidedeepcategory.groovy Fri Dec 26 06:54:50 2014
@@ -41,7 +41,7 @@ currentTopCategoryId = CategoryWorker.ge
 currentTopCategory = null;
 if (isOpen) {
     CategoryWorker.getRelatedCategories(request, "topLevelList", currentTopCategoryId, false);
-    currentTopCategory = delegator.findOne("ProductCategory", [productCategoryId : currentTopCategoryId], true);
+    currentTopCategory = from("ProductCategory").where("productCategoryId", currentTopCategoryId).cache(true).queryOne();
     context.topLevelList = request.getAttribute("topLevelList");
 }
 curCategoryId = UtilFormatOut.checkNull(requestParameters.productCategoryId);

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageGallery.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageGallery.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageGallery.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageGallery.groovy Fri Dec 26 06:54:50 2014
@@ -28,15 +28,14 @@ import org.ofbiz.entity.condition.*;
 import org.ofbiz.entity.util.*;
 
 productImageList = [];
-productContentAndInfoImageManamentList = delegator.findByAnd("ProductContentAndInfo", ["productId": productId, productContentTypeId : "IMAGE", "statusId" : "IM_APPROVED"], ["sequenceNum"], false);
+productContentAndInfoImageManamentList = from("ProductContentAndInfo").where("productId", productId, "productContentTypeId", "IMAGE", "statusId", "IM_APPROVED").orderBy("sequenceNum").queryList();
 if(productContentAndInfoImageManamentList) {
     productContentAndInfoImageManamentList.each { productContentAndInfoImageManament ->
-        contentAssocThumbList = delegator.findByAnd("ContentAssoc", [contentId : productContentAndInfoImageManament.contentId, contentAssocTypeId : "IMAGE_THUMBNAIL"], null, false);
-        contentAssocThumb = EntityUtil.getFirst(contentAssocThumbList);
+        contentAssocThumb = from("ContentAssoc").where("contentId", productContentAndInfoImageManament.contentId, "contentAssocTypeId", "IMAGE_THUMBNAIL").queryFirst();
         if(contentAssocThumb) {
-            imageContentThumb = delegator.findOne("Content", [contentId : contentAssocThumb.contentIdTo], false);
+            imageContentThumb = from("Content").where("contentId", contentAssocThumb.contentIdTo).queryOne();
             if(imageContentThumb) {
-                productImageThumb = delegator.findOne("ContentDataResourceView", [contentId : imageContentThumb.contentId, drDataResourceId : imageContentThumb.dataResourceId], false);
+                productImageThumb = from("ContentDataResourceView").where("contentId", imageContentThumb.contentId, "drDataResourceId", imageContentThumb.dataResourceId).queryOne();
                 productImageMap = [:];
                 productImageMap.contentId = productContentAndInfoImageManament.contentId;
                 productImageMap.dataResourceId = productContentAndInfoImageManament.dataResourceId;

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageRecentlyApproved.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageRecentlyApproved.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageRecentlyApproved.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageRecentlyApproved.groovy Fri Dec 26 06:54:50 2014
@@ -45,15 +45,11 @@ for(i in 0..limit){
     exprs.add(EntityCondition.makeCondition("statusId",EntityOperator.EQUALS, "IM_APPROVED"))
     exprs.add(EntityCondition.makeCondition("purchaseFromDate", EntityOperator.GREATER_THAN_EQUAL_TO, timeStampDate1))
     exprs.add(EntityCondition.makeCondition("purchaseFromDate", EntityOperator.LESS_THAN, timeStampDate2))
-    def fieldsToSelect = UtilMisc.toSet("productId")
-    def findOptions = new EntityFindOptions()
-    findOptions.setDistinct(true)
     // query result
-    def productContentAndInfoList = delegator.findList("ProductContentAndInfo", EntityCondition.makeCondition(exprs, EntityOperator.AND), fieldsToSelect, null, findOptions, false)
+    def productContentAndInfoList = select("productId").from("ProductContentAndInfo").where(exprs).distinct().queryList();
     
     // finding time
-    def orderBy = UtilMisc.toList("productId")
-    def timeList = delegator.findList("ProductContentAndInfo", EntityCondition.makeCondition(exprs, EntityOperator.AND), null, orderBy, null, false)
+    def timeList = from("ProductContentAndInfo").where(exprs).orderBy("productId").queryList();
     def groupByTimeList =  timeList.groupBy{it.productId}
     def tempTimeList = []
     groupByTimeList.each() {

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageUpload.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageUpload.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageUpload.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageUpload.groovy Fri Dec 26 06:54:50 2014
@@ -143,4 +143,4 @@ if (fileType) {
     }
 }
 
-context.productFeatures = delegator.findList("ProductFeature", EntityCondition.makeCondition([productFeatureTypeId : "SIZE", productFeatureCategoryId : "IMAGE"]), null, null, null, false);
+context.productFeatures = from("ProductFeature").where("productFeatureTypeId", "SIZE", "productFeatureCategoryId", "IMAGE").queryList();

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy Fri Dec 26 06:54:50 2014
@@ -38,7 +38,7 @@ imageManagementPath = FlexibleStringExpa
 String fileType = "original";
 String productId = request.getParameter("productId");
 
-productContentList = delegator.findByAnd("ProductContentAndInfo", UtilMisc.toMap("productId", productId, "productContentTypeId", "DEFAULT_IMAGE"), null, false);
+productContentList = from("ProductContentAndInfo").where("productId", productId, "productContentTypeId", "DEFAULT_IMAGE").queryList();
 if (productContentList) {
     dataResourceName = productContentList.get(0).drDataResourceName
 }
@@ -60,7 +60,7 @@ context.imageNameOriginal = imageUrlPref
 
 // Start ProductContent stuff
 if (productId) {
-    product = delegator.findOne("Product",["productId" : productId], false);
+    product = from("Product").where("productId", productId).queryOne();
     context.productId = productId;
 }
 

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/seoLocales.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/seoLocales.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/seoLocales.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/seoLocales.groovy Fri Dec 26 06:54:50 2014
@@ -32,7 +32,7 @@ def nameLocal;
 def productTextData;
 contentAssocs.each { contentAssoc ->
 
-content = delegator.findOne("Content",[contentId : contentAssoc.contentIdTo], false);
+content = from("Content").where("contentId", contentAssoc.contentIdTo).queryOne();
 localeString = content.localeString;
 
     if (serverLocal == "au") {
@@ -58,7 +58,7 @@ localeString = content.localeString;
     }
     
     if (localeString == nameLocal) {
-            electronicText = delegator.findOne("ElectronicText",[dataResourceId : content.dataResourceId], false);
+            electronicText = from("ElectronicText").where("dataResourceId", content.dataResourceId).queryOne();
             productTextData = electronicText.textData;
     }
 

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/sortSequenceNum.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/sortSequenceNum.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/sortSequenceNum.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/sortSequenceNum.groovy Fri Dec 26 06:54:50 2014
@@ -20,12 +20,12 @@
 import org.ofbiz.entity.*
 import org.ofbiz.base.util.*
 
-allSequenceNums = delegator.findByAnd("ProductContent", ["productId":parameters.productId, "productContentTypeId":"IMAGE"], ["sequenceNum"], false)
-nullSequenceNums = delegator.findByAnd("ProductContent", ["productId":parameters.productId, "productContentTypeId":"IMAGE", "sequenceNum":null], null, false)
+allSequenceNums = from("ProductContent").where("productId", parameters.productId, "productContentTypeId", "IMAGE").queryList();
+nullSequenceNums = from("ProductContent").where("productId", parameters.productId, "productContentTypeId", "IMAGE", "sequenceNum", null).queryList();
 productContents = allSequenceNums - nullSequenceNums
 def duplicate = 0
 if(parameters.sequenceNum){
-    findExisted = delegator.findByAnd("ProductContent", ["productId":parameters.productId, "productContentTypeId":"IMAGE", "sequenceNum":(Long)parameters.sequenceNum], null, false)
+    findExisted = from("ProductContent").where("productId", parameters.productId, "productContentTypeId", "IMAGE", "sequenceNum", (Long)parameters.sequenceNum).queryList();
     duplicate = findExisted.size()
 }
 if(duplicate > 1){

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/lookup/LookupVariantProduct.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/lookup/LookupVariantProduct.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/lookup/LookupVariantProduct.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/lookup/LookupVariantProduct.groovy Fri Dec 26 06:54:50 2014
@@ -22,7 +22,7 @@ import org.ofbiz.base.util.*;
 productId = request.getParameter("productId");
 productVariantId = productId + "_";
 productFeatureIds = "";
-product = delegator.findOne("Product", [productId : productId], false);
+product = from("Product").where("productId", productId).queryOne();
 
 result = runService('getProductFeaturesByType', [productId : productId, productFeatureApplTypeId : "SELECTABLE_FEATURE"]);
 featureTypes = result.productFeatureTypes;
@@ -39,7 +39,7 @@ if (featureTypes) {
         if (selectedFeatureTypeValue) {
             featureTypeAndValues.selectedFeatureId = selectedFeatureTypeValue;
             selectedFeatureTypeValues.add(selectedFeatureTypeValue);
-            feature = delegator.findOne("ProductFeature", [productFeatureId : selectedFeatureTypeValue], true);
+            feature = from("ProductFeature").where("productFeatureId", selectedFeatureTypeValue).cache(true).queryOne();
             productVariantId += feature.getString("idCode") ?: "";
             productFeatureIds += "|" + selectedFeatureTypeValue;
         }
@@ -66,7 +66,7 @@ context.variants = variants;
 // also need the variant products themselves
 variantProducts = [];
 variants.each { variantId ->
-    variantProducts.add(delegator.findOne("Product", [productId : variantId], true));
+    variantProducts.add(from("Product").where("productId", variantId).cache(true).queryOne());
 }
 context.variantProducts = variantProducts;
 

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules.groovy Fri Dec 26 06:54:50 2014
@@ -21,9 +21,9 @@ import org.ofbiz.entity.condition.*
 import org.ofbiz.entity.util.EntityUtil;
 import org.ofbiz.base.util.UtilMisc;
 
-context.inputParamEnums = delegator.findList("Enumeration", EntityCondition.makeCondition([enumTypeId : 'PROD_PRICE_IN_PARAM']), null, ['sequenceId'], null, true);
-context.condOperEnums = delegator.findList("Enumeration", EntityCondition.makeCondition([enumTypeId : 'PROD_PRICE_COND']), null, ['sequenceId'], null, true);
-context.productPriceActionTypes = delegator.findList("ProductPriceActionType", null, null, ['description'], null, true);
+context.inputParamEnums = from("Enumeration").where("enumTypeId", "PROD_PRICE_IN_PARAM").orderBy("sequenceId").cache(true).queryList();
+context.condOperEnums = from("Enumeration").where("enumTypeId", "PROD_PRICE_COND").orderBy("sequenceId").cache(true).queryList();
+context.productPriceActionTypes = from("ProductPriceActionType").orderBy("description").cache(true).queryList();
 
 String priceRuleId = request.getParameter("productPriceRuleId");
 
@@ -33,7 +33,7 @@ if (!priceRuleId) {
 
 if (priceRuleId) {
     productPriceRules = [];
-    productPriceRules.add(delegator.findOne("ProductPriceRule", [productPriceRuleId : priceRuleId], false));
+    productPriceRules.add(from("ProductPriceRule").where("productPriceRuleId", priceRuleId).queryOne());
     productPriceConds = productPriceRules[0].getRelated("ProductPriceCond", null, ["productPriceCondSeqId"], true);
     productPriceActions = productPriceRules[0].getRelated("ProductPriceAction", null, ["productPriceActionSeqId"], true);
     

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules_old.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules_old.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules_old.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules_old.groovy Fri Dec 26 06:54:50 2014
@@ -21,11 +21,11 @@ import org.ofbiz.entity.condition.*
 
 String priceRuleId = request.getParameter("productPriceRuleId");
 if (priceRuleId) {
-    context.productPriceRule = delegator.findOne("ProductPriceRule", [productPriceRuleId : priceRuleId], false);
+    context.productPriceRule = from("ProductPriceRule").where("productPriceRuleId", priceRuleId).queryOne();
 }
 
-context.inputParamEnums = delegator.findList("Enumeration", EntityCondition.makeCondition([enumTypeId : 'PROD_PRICE_IN_PARAM']), null, ['sequenceId'], null, true);
+context.inputParamEnums = from("Enumeration").where("enumTypeId", 'PROD_PRICE_IN_PARAM').orderBy("sequenceId").cache(true).queryList();
 
-context.condOperEnums = delegator.findList("Enumeration", EntityCondition.makeCondition([enumTypeId : 'PROD_PRICE_COND']), null, ['sequenceId'], null, true);
+context.condOperEnums = from("Enumeration").where("enumTypeId", "PROD_PRICE_COND").orderBy("sequenceId").cache(true).queryList();
 
-context.productPriceActionTypes = delegator.findList("ProductPriceActionType", null, null, ['description'], null, true);
+context.productPriceActionTypes = from("ProductPriceActionType").orderBy("description").cache(true).queryList();

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromCategory.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromCategory.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromCategory.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromCategory.groovy Fri Dec 26 06:54:50 2014
@@ -32,18 +32,18 @@ context.productFeatureCategoryId = produ
 
 context.selFeatureApplTypeId = request.getParameter("productFeatureApplTypeId");
 
-context.curProductFeatureCategory = delegator.findOne("ProductFeatureCategory", [productFeatureCategoryId : productFeatureCategoryId], false);
+context.curProductFeatureCategory = from("ProductFeatureCategory").where("productFeatureCategoryId", productFeatureCategoryId).queryOne();
 
-context.productFeatureTypes = delegator.findList("ProductFeatureType", null, null, ['description'], null, false);
+context.productFeatureTypes = from("ProductFeatureType").orderBy("description").queryList();
 
-context.productFeatureCategories = delegator.findList("ProductFeatureCategory", null, null, ['description'], null, false);
+context.productFeatureCategories = from("ProductFeatureCategory").orderBy("description").queryList();
 
 //we only need these if we will be showing the apply feature to category forms
 if (productId) {
-    context.productFeatureApplTypes = delegator.findList("ProductFeatureApplType", null, null, ['description'], null, false);
+    context.productFeatureApplTypes = from("ProductFeatureApplType").orderBy("description").queryList();
 }
 
-productFeaturesSize = delegator.findCountByCondition("ProductFeature", EntityCondition.makeCondition("productFeatureCategoryId", EntityOperator.EQUALS, productFeatureCategoryId), null, null);
+productFeaturesSize = from("ProductFeature").where("productFeatureCategoryId", productFeatureCategoryId).queryCount();
 
 highIndex = 0;
 lowIndex = 0;
@@ -64,17 +64,17 @@ context.listSize = listSize;
 context.lowIndex = lowIndex;
 context.highIndex = highIndex;
 
-whereCondition = EntityCondition.makeCondition([productFeatureCategoryId : productFeatureCategoryId], EntityOperator.AND);
-EntityFindOptions efo = new EntityFindOptions();
-efo.setDistinct(true);
-efo.setResultSetType(EntityFindOptions.TYPE_SCROLL_INSENSITIVE);
-efo.setMaxRows(highIndex);
-
 boolean beganTransaction = false;
 try {
     beganTransaction = TransactionUtil.begin();
 
-    productFeaturesEli = delegator.find("ProductFeature", whereCondition, null, null, ['productFeatureTypeId', 'defaultSequenceNum', 'description'], efo);
+    productFeaturesEli = from("ProductFeature")
+        .where("productFeatureCategoryId", productFeatureCategoryId)
+        .orderBy("productFeatureTypeId", "defaultSequenceNum", "description")
+        .distinct()
+        .cursorScrollInsensitive()
+        .maxRows(highIndex)
+        .queryIterator();
     productFeatures = productFeaturesEli.getPartialList(lowIndex + 1, highIndex - lowIndex);
     productFeaturesEli.close();
 } catch (GenericEntityException e) {
@@ -101,7 +101,7 @@ productFeatureIter = productFeatures.ite
 productFeatureApplIter = null;
 while (productFeatureIter) {
     productFeature = productFeatureIter.next();
-    productFeatureAppls = delegator.findList("ProductFeatureAppl", EntityCondition.makeCondition([productId : productId, productFeatureId : productFeature.productFeatureId]), null, null, null, false);
+    productFeatureAppls = from("ProductFeatureAppl").where("productId", productId, "productFeatureId", productFeature.productFeatureId).queryList();
     productFeatureApplIter = productFeatureAppls.iterator();
     while (productFeatureApplIter) {
         productFeatureAppl = productFeatureApplIter.next();

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromGroup.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromGroup.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromGroup.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromGroup.groovy Fri Dec 26 06:54:50 2014
@@ -26,7 +26,7 @@ import org.ofbiz.entity.*
 
 productFeatureGroupId = parameters.get("productFeatureGroupId");
 if (productFeatureGroupId) {
-    productFeatureGroup = delegator.findOne("ProductFeatureGroup", [productFeatureGroupId : productFeatureGroupId], false);
+    productFeatureGroup = from("ProductFeatureGroup").where("productFeatureGroupId", productFeatureGroupId).queryOne();
     productFeatures = [];
     productFeatureGroupAppls = productFeatureGroup.getRelated("ProductFeatureGroupAppl", null, ['sequenceNum'], false);
     for (pFGAi = productFeatureGroupAppls.iterator(); pFGAi;) {

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy Fri Dec 26 06:54:50 2014
@@ -28,14 +28,10 @@ exprList.add(EntityCondition.makeConditi
 exprList.add(EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, UtilDateTime.getDayEnd(filterDate)));
 exprList.add(EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER"));
 
-orderHeaderList = delegator.findList("OrderHeader", EntityCondition.makeCondition(exprList, EntityOperator.AND), null, null, null, false);
+orderHeaderList = from("OrderHeader").where(exprList).queryList();
 
 orderHeaderList.each { orderHeader ->
-    exprList = [];
-    exprList.add(EntityCondition.makeCondition("orderId", EntityOperator.EQUALS, orderHeader.orderId));
-    exprList.add(EntityCondition.makeCondition("orderItemTypeId", EntityOperator.EQUALS, "PRODUCT_ORDER_ITEM"));
-    exprList.add(EntityCondition.makeCondition("isPromo", EntityOperator.EQUALS, "N"));
-    orderItemList = delegator.findList("OrderItem", EntityCondition.makeCondition(exprList, EntityOperator.AND), null, null, null, false);
+    orderItemList = from("OrderItem").where("orderId", orderHeader.orderId, "orderItemTypeId", "PRODUCT_ORDER_ITEM", "isPromo", "N").queryList();
     
     orderItemList.each { orderItem ->
         orderItemDetail = [:];
@@ -58,7 +54,7 @@ orderHeaderList.each { orderHeader ->
         
         if (inListFlag == false) {
             orderItemDetail.productId = orderItem.productId;
-            product = delegator.findOne("Product", [productId : orderItem.productId], false);
+            product = from("Product").where("productId", orderItem.productId).queryOne()
             contentWrapper = new ProductContentWrapper(product, request);
             orderItemDetail.productName = contentWrapper.get("PRODUCT_NAME");
             orderItemDetail.amount = amount;

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductAssoc.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductAssoc.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductAssoc.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductAssoc.groovy Fri Dec 26 06:54:50 2014
@@ -57,12 +57,12 @@ if (!fromDate) {
     context.fromDate = fromDate;
 }
 
-product = delegator.findOne("Product", [productId : productId], false);
+product = from("Product").where("productId", productId).queryOne();
 if (product) {
     context.product = product;
 }
 
-productAssoc = delegator.findOne("ProductAssoc", [productId : productId, productIdTo : productIdTo, productAssocTypeId : productAssocTypeId, fromDate : fromDate], false);
+productAssoc = from("ProductAssoc").where("productId", productId, "productIdTo", productIdTo, "productAssocTypeId", productAssocTypeId, "fromDate", fromDate).queryOne();
 if (productAssoc) {
     context.productAssoc = productAssoc;
 }
@@ -78,7 +78,7 @@ if (!productAssoc) {
 context.useValues = useValues;
 context.isCreate = true;
 
-assocTypes = delegator.findList("ProductAssocType", null, null, ['description'], null, false);
+assocTypes = from("ProductAssocType").orderBy("description").queryList();
 context.assocTypes = assocTypes;
 
 if (product) {

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContentContent.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContentContent.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContentContent.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContentContent.groovy Fri Dec 26 06:54:50 2014
@@ -43,7 +43,7 @@ if (!description) {
     description = null;
 }
 
-productContent = delegator.findOne("ProductContent", [contentId : contentId, productId : productId, productContentTypeId : productContentTypeId, fromDate : fromDate], false);
+productContent = from("ProductContent").where("contentId", contentId, "productId", productId, "productContentTypeId", productContentTypeId, "fromDate", fromDate).queryOne();
 if (!productContent) {
     productContent = [:];
     productContent.productId = productId;
@@ -66,7 +66,7 @@ productContentData.putAll(productContent
 content = [:];
 context.contentId = contentId;
 if (contentId) {
-    content = delegator.findOne("Content", [contentId : contentId], false);
+    content = from("Content").where("contentId", contentId).queryOne();
     context.content = content;
 } else {
     if (description) {
@@ -134,7 +134,7 @@ if ("FULFILLMENT_EMAIL".equals(productCo
     context.textData = textData;
 }
 if (productContentTypeId) {
-    productContentType = delegator.findOne("ProductContentType", [productContentTypeId : productContentTypeId], false);
+    productContentType = from("ProductContentType").where("productContentTypeId", productContentTypeId).queryOne();
     if (productContentType && "DIGITAL_DOWNLOAD".equals(productContentType.parentTypeId)) {
         context.contentFormName = "EditProductContentDownload";
     }

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductFeatures.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductFeatures.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductFeatures.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductFeatures.groovy Fri Dec 26 06:54:50 2014
@@ -19,14 +19,12 @@
 
 import org.ofbiz.entity.condition.*;
 
-context.productFeatureAndAppls = delegator.findList('ProductFeatureAndAppl',
-        EntityCondition.makeCondition([productId : productId]), null,
-        ['sequenceNum', 'productFeatureApplTypeId', 'productFeatureTypeId', 'description'], null, false);
+context.productFeatureAndAppls = from("ProductFeatureAndAppl").where("productId", productId).orderBy("sequenceNum", "productFeatureApplTypeId", "productFeatureTypeId", "description").queryList();
 
-context.productFeatureCategories = delegator.findList('ProductFeatureCategory', null, null, ['description'], null, false);
+context.productFeatureCategories = from("ProductFeatureCategory").orderBy("description").queryList();
 
-context.productFeatureApplTypes = delegator.findList('ProductFeatureApplType', null, null, ['description'], null, true);
+context.productFeatureApplTypes = from("ProductFeatureApplType").orderBy("description").cache(true).queryList();
 
-context.productFeatureGroups = delegator.findList('ProductFeatureGroup', null, null, ['description'], null, false);
+context.productFeatureGroups = from("ProductFeatureGroup").orderBy("description").queryList();
 
-context.productFeatureTypes = delegator.findList('ProductFeatureType', null, null, ['description'], null, true);
+context.productFeatureTypes = from("ProductFeatureType").orderBy("description").queryList();

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.groovy Fri Dec 26 06:54:50 2014
@@ -67,9 +67,9 @@ if (product) {
         // The warehouse list is selected
         showAllFacilities = parameters.showAllFacilities;
         if (showAllFacilities && "Y".equals(showAllFacilities)) {
-            facilityList = delegator.findList("Facility", null, null, null, null, false);
+            facilityList = from("Facility").queryList();
         } else {
-            facilityList = delegator.findList("ProductFacility", EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId), null, null, null, false);
+            facilityList = from("ProductFacility").where("productId", productId).queryList();
         }
         facilityIterator = facilityList.iterator();
         dispatcher = request.getAttribute("dispatcher");
@@ -97,9 +97,7 @@ if (product) {
             quantitySummaryByFacility.put(facility.facilityId, quantitySummary);
         }
         
-        productInventoryItems = delegator.findByAnd("InventoryItem",
-                [productId : productId],
-                ['facilityId', '-datetimeReceived', '-inventoryItemId'], false);
+        productInventoryItems = from("InventoryItem").where("productId", productId).orderBy("facilityId", "-datetimeReceived", "-inventoryItemId").queryList();
     
         // TODO: get all incoming shipments not yet arrived coming into each facility that this product is in, use a view entity with ShipmentAndItem
         findIncomingShipmentsConds = [];
@@ -119,7 +117,7 @@ if (product) {
         findIncomingShipmentsConds.add(EntityCondition.makeCondition(findIncomingShipmentsStatusConds, EntityOperator.AND));
     
         findIncomingShipmentsStatusCondition = EntityCondition.makeCondition(findIncomingShipmentsConds, EntityOperator.AND);
-        incomingShipmentAndItems = delegator.findList("ShipmentAndItem", findIncomingShipmentsStatusCondition, null, ['-estimatedArrivalDate'], null, false);
+        incomingShipmentAndItems = from("ShipmentAndItem").where(findIncomingShipmentsStatusCondition).orderBy("-estimatedArrivalDate").queryList();
         incomingShipmentAndItemIter = incomingShipmentAndItems.iterator();
         while (incomingShipmentAndItemIter) {
             incomingShipmentAndItem = incomingShipmentAndItemIter.next();

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductQuickAdmin.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductQuickAdmin.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductQuickAdmin.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductQuickAdmin.groovy Fri Dec 26 06:54:50 2014
@@ -26,9 +26,9 @@ import org.ofbiz.entity.util.EntityUtilP
 
 context.nowTimestampString = UtilDateTime.nowTimestamp().toString();
 
-context.assocTypes = delegator.findList("ProductAssocType", null, null, null, null, false);
+context.assocTypes = from("ProductAssocType").queryList();
 
-context.featureTypes = delegator.findList("ProductFeatureType", null, null, null, null, false);
+context.featureTypes = from("ProductFeatureType").queryList();
 
 // add/remove feature types
 addedFeatureTypes = (HashMap) session.getAttribute("addedFeatureTypes");
@@ -47,7 +47,7 @@ if (addFeatureTypeId) {
 addFeatureTypeIdIter = addFeatureTypeIdList.iterator();
 while (addFeatureTypeIdIter) {
     String curFeatureTypeId = addFeatureTypeIdIter.next();
-    GenericValue featureType = delegator.findOne("ProductFeatureType", [productFeatureTypeId : curFeatureTypeId], false);
+    GenericValue featureType = from("ProductFeatureType").where("productFeatureTypeId", curFeatureTypeId).queryOne();
     if ((featureType) && !addedFeatureTypes.containsKey(curFeatureTypeId)) {
         addedFeatureTypes.put(curFeatureTypeId, featureType);
     }
@@ -56,7 +56,7 @@ while (addFeatureTypeIdIter) {
 String[] removeFeatureTypeId = request.getParameterValues("removeFeatureTypeId");
 if (removeFeatureTypeId) {
     for (int i = 0; i < removeFeatureTypeId.length; i++) {
-        GenericValue featureType = delegator.findOne("ProductFeatureType", [productFeatureTypeId : addFeatureTypeId[i]], false);
+        GenericValue featureType = from("ProductFeatureType").where("productFeatureTypeId", addFeatureTypeId[i]).queryOne();
         if ((featureType) && addedFeatureTypes.containsKey(removeFeatureTypeId[i])) {
             addedFeatureTypes.remove(removeFeatureTypeId[i]);
             featuresByType.remove(removeFeatureTypeId[i]);
@@ -84,7 +84,7 @@ if (productId) {
     context.productId = productId;
 }
 
-product = delegator.findOne("Product", [productId : productId], false);
+product = from("Product").where("productId", productId).queryOne();
 assocProducts = [];
 featureFloz = [:];
 featureMl = [:];
@@ -108,9 +108,8 @@ if (product) {
     context.product = product;
 
     // get categories
-    allCategories = delegator.findList("ProductCategory",
-            EntityCondition.makeCondition(EntityCondition.makeCondition("showInSelect", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("showInSelect", EntityOperator.NOT_EQUAL, "N")),
-            null, ['description'], null, false);
+    allCategories = from("ProductCategory").where(EntityCondition.makeCondition(EntityCondition.makeCondition("showInSelect", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("showInSelect", EntityOperator.NOT_EQUAL, "N")))
+        .orderBy("description").queryList();
 
     categoryMembers = product.getRelated("ProductCategoryMember", null, null, false);
     categoryMembers = EntityUtil.filterByDate(categoryMembers);
@@ -308,7 +307,7 @@ String allCategoryId = EntityUtilPropert
 context.allCategoryId = allCategoryId;
 
 // show the publish or unpublish section
-prodCatMembs = delegator.findList("ProductCategoryMember", EntityCondition.makeCondition([productCategoryId : allCategoryId, productId : productId]), null, null, null, false);
+prodCatMembs = from("ProductCategoryMember").where("productCategoryId", allCategoryId, "productId", productId).queryList();
 //don't filter by date, show all categories: prodCatMembs = EntityUtil.filterByDate(prodCatMembs);
 
 String showPublish = "false";

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductSEO.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductSEO.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductSEO.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductSEO.groovy Fri Dec 26 06:54:50 2014
@@ -19,21 +19,21 @@
 
 productId = parameters.productId;
 if (productId) {
-    productContents  = delegator.findByAnd("ProductContent", ["productId" : productId], null, false);
+    productContents  = from("ProductContent").where("productId", productId).queryList();
     productContents.each{ productContent->
         if (productContent.productContentTypeId == "PAGE_TITLE") {
-            contentTitle  = delegator.findOne("Content", ["contentId" : productContent.contentId], false);
-            dataTextTitle  = delegator.findOne("ElectronicText", ["dataResourceId" : contentTitle.dataResourceId], false);
+            contentTitle  = from("Content").where("contentId", productContent.contentId).queryOne();
+            dataTextTitle  = from("ElectronicText").where("dataResourceId", contentTitle.dataResourceId).queryOne();
             context.title = dataTextTitle.textData;
         }
         if (productContent.productContentTypeId == "META_KEYWORD") {
-            contentMetaKeyword  = delegator.findOne("Content", ["contentId" : productContent.contentId], false);
-            dataTextMetaKeyword  = delegator.findOne("ElectronicText", ["dataResourceId" : contentMetaKeyword.dataResourceId], false);
+            contentMetaKeyword  = from("Content").where("contentId", productContent.contentId).queryOne();
+            dataTextMetaKeyword  = from("ElectronicText").where("dataResourceId", contentMetaKeyword.dataResourceId).queryOne();
             context.metaKeyword = dataTextMetaKeyword.textData;
         }
         if (productContent.productContentTypeId == "META_DESCRIPTION") {
-            contentMetaDescription  = delegator.findOne("Content", ["contentId" : productContent.contentId], false);
-            dataTextMetaDescription  = delegator.findOne("ElectronicText", ["dataResourceId" : contentMetaDescription.dataResourceId], false);
+            contentMetaDescription  = from("Content").where("contentId", productContent.contentId).queryOne();
+            dataTextMetaDescription  = from("ElectronicText").where("dataResourceId", contentMetaDescription.dataResourceId).queryOne();
             context.metaDescription = dataTextMetaDescription.textData;
         }
     }

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/promo/EditProductPromoCode.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/promo/EditProductPromoCode.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/promo/EditProductPromoCode.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/promo/EditProductPromoCode.groovy Fri Dec 26 06:54:50 2014
@@ -21,7 +21,7 @@ productPromoCodeId = request.getParamete
 if (!productPromoCodeId) {
     productPromoCodeId = request.getAttribute("productPromoCodeId");
 }
-productPromoCode = delegator.findOne("ProductPromoCode", [productPromoCodeId : productPromoCodeId], false);
+productPromoCode = from("ProductPromoCode").where("productPromoCodeId", productPromoCodeId).queryOne();
 
 productPromoId = null;
 if (productPromoCode) {
@@ -32,7 +32,7 @@ if (productPromoCode) {
 
 productPromo = null;
 if (productPromoId) {
-    productPromo = delegator.findOne("ProductPromo", [productPromoId : productPromoId], false);
+    productPromo = from("ProductPromo").where("productPromoId", productPromoId).queryOne();
 }
 
 productPromoCodeEmails = null;

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/store/EditProductStorePaySetup.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/store/EditProductStorePaySetup.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/store/EditProductStorePaySetup.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/store/EditProductStorePaySetup.groovy Fri Dec 26 06:54:50 2014
@@ -83,5 +83,5 @@ if (!paymentMethodTypeId || !paymentServ
 if (paymentServiceTypeEnumId == "PRDS_PAY_EXTERNAL") {
     context.paymentCustomMethods = null;
 } else {
-    context.paymentCustomMethods = delegator.findList("CustomMethod", customMethodsCond, null, ["description"], null, false);
+    context.paymentCustomMethods = from("CustomMethod").where(customMethodsCond).orderBy("description").queryList();
 }

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/store/EditProductStoreSurveys.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/store/EditProductStoreSurveys.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/store/EditProductStoreSurveys.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/store/EditProductStoreSurveys.groovy Fri Dec 26 06:54:50 2014
@@ -25,17 +25,17 @@ context.hasPermission = security.hasEnti
 
 productStoreId = request.getParameter("productStoreId");
 if (productStoreId) {
-    productStore = delegator.findOne("ProductStore", [productStoreId : productStoreId], false);
+    productStore = from("ProductStore").where("productStoreId", productStoreId).queryOne();
     context.productStoreId = productStoreId;
     context.productStore = productStore;
 }
 
-context.productStoreSurveys = EntityUtil.filterByDate(delegator.findList("ProductStoreSurveyAppl", EntityCondition.makeCondition([productStoreId : productStoreId]), null, null, null, false));
+context.productStoreSurveys = from("ProductStoreSurveyAppl").where("productStoreId", productStoreId).filterByDate().queryList();
 
-context.surveys = delegator.findList("Survey", null, null, ['description'], null, false);
+context.surveys = from("Survey").orderBy("description").queryOne();
 
-context.surveyApplTypes = delegator.findList("SurveyApplType", null, null, ['description'], null, false);
+context.surveyApplTypes = from("SurveyApplType").orderBy("description").queryFirst();
 
-context.productCategories = delegator.findList("ProductCategory", null, null, ['description'], null, false);
+context.productCategories = from("ProductCategory").orderBy("description").queryList();
 
 context.nowTimestampString = UtilDateTime.nowTimestamp().toString();

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/thesaurus/EditKeywordThesaurus.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/thesaurus/EditKeywordThesaurus.groovy?rev=1647937&r1=1647936&r2=1647937&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/thesaurus/EditKeywordThesaurus.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/thesaurus/EditKeywordThesaurus.groovy Fri Dec 26 06:54:50 2014
@@ -19,9 +19,9 @@
 
 import org.ofbiz.entity.condition.*
 
-relationshipEnums = delegator.findList("Enumeration", EntityCondition.makeCondition([enumTypeId : 'KW_THES_REL']), null, ['sequenceId'], null, true);
+relationshipEnums = from("Enumeration").where("enumTypeId", "KW_THES_REL").orderBy("sequenceId").cache(true).queryList();
 
-keywordThesauruses = delegator.findList("KeywordThesaurus", null, null, ['enteredKeyword'], null, false);
+keywordThesauruses = from("KeywordThesaurus").orderBy("enteredKeyword").queryList();
 
 //if no param sent in make firstLetter 'a' else use firstLetter passed in
 firstLetterString = request.getParameter("firstLetter");